description: "A per-session run-speed selector for DSH that adds parallel-execution guidance without changing the selected model or reasoning effort."
kind: "package-bundle"
dsh-run-speed
This optional DSH bundle adds a Run speed menu to the composer and a matching /run-speed command. It lets you
choose, per session, how aggressively the agent may fan work out to parallel background subagents while the selected
provider, model, and reasoning effort stay exactly as they are.
| Mode | Added prompt text | Parallel subagents | 中文 |
|---|
| Standard | none | the model's normal strategy | 标准 |
| Fast | one dynamic prompt section | up to 3, launched together in one message | 快速 |
| Turbo | one dynamic prompt section | 4 through 6 | 极速 |
The plugin never switches provider, model, or reasoning effort, and it never patches Harness core packages. Install or
remove the bundle through the DSH plugin manager; cordis.patch.yml contributes a single plugin entry
(id: run-speed).
Repository: https://github.com/yjc925925/dsh-run-speed
Usage
The composer control and the command are two views of the same state: the button drives the Host command through the
remote command service, reads the authoritative mode back from it when it mounts, and adopts the mode it just applied
after a switch succeeds. Both the English words and the Chinese equivalents are accepted; bare /run-speed and
/run-speed status report the current mode.
/run-speed # -> "Run speed: standard."
/run-speed fast # -> "Run speed set to fast. Model and reasoning effort remain unchanged."
/run-speed 极速 # same as /run-speed turbo
The composer control sits in the conversation.input.right slot (order 30) and is disabled while the session is
running or removed, and while a switch is in flight.
Model Experience
Selected run-speed policy
What the model sees
Fast and Turbo contribute one dynamic system-prompt section (user:run-speed, order 425). Its text tells the parent
and every child to keep the current provider, model, and reasoning effort, to batch independent parallel-safe tool
calls, to keep dependent work serial rather than delegating it, and to partition file ownership so that two agents
never write the same file. Standard contributes an empty section — the section itself is always registered, but its
text is an empty string, so no tokens are spent.
Token effect
Fast and Turbo add a short fixed prompt and can spend substantially more tokens overall by running parallel
subagents. Standard adds no model tokens.
KV Cache effect
Changing modes replaces the active system prompt on the next model request and can start a new reusable request
prefix. Flipping modes back and forth therefore costs cache re-use on the following request.
Layout
| Path | Contents |
|---|
src/index.ts | Host half: RUN_SPEED_GUIDANCE, parseRunSpeedMode(input), the user:run-speed prompt section, and the /run-speed command |
src/types.ts | RunSpeedMode union ('standard' | 'fast' | 'turbo') shared by both halves |
src/client/index.ts | Browser half: dictionary registration plus the conversation.input.right slot contribution |
src/client/RunSpeedControl.tsx | The composer menu component |
src/client/locales.ts | Simplified Chinese (key source) and English dictionaries |
src/client/RunSpeedControl.module.css | Stylesheet for the control |
tests/run-speed.client.spec.ts | Vitest suite for parsing, guidance text, and per-session isolation |
lib/index.js | Prebuilt Host ESM entry |
lib/client.js + lib/client.js.map | Prebuilt browser bundle and its source map |
lib/types/**/*.d.ts + *.d.ts.map | tsc declaration output and its declaration maps |
locale/{en,zh}.json | Plugin-manager card copy |
The repository ships the prebuilt lib/ artifacts, so the bundle can be installed and run without a build step. The
sources are published alongside them for review and for future maintenance.
Development
This package is developed as a member of the deepseek-harness monorepo at packages/client/ui-run-speed/. Committed
here are the sources, the Vitest suite, and the build configuration, because the npm tarball's files allowlist
excluded all of them.
A standalone build is not wired up yet. The build and type-check configuration reaches into monorepo scaffolding
that this repository does not contain: tsdown.config.ts imports ../tsdown.client.ts; tsconfig.host.json extends
../../../tsconfig.base.json with five project references; tsconfig.client.json extends
../../../tsconfig.base.client.json with nine.
The declared dependencies are not the problem. npm install resolves every @deepseek-ai/dsh-* pin from the public
registry in a couple of seconds — those releases carry the next dist-tag rather than latest, which is why
npm view <pkg> version suggests they are missing. What is missing here are the build tools themselves: the test
script needs vitest and the bundle script needs tsdown, and neither is declared in this package.json — they are
inherited from the monorepo root. In a bare clone, npm test therefore fails at the tool, not at the sources.
The supported way to rebuild is still from a deepseek-harness checkout:
# from a deepseek-harness checkout
pnpm --filter dsh-run-speed bundle
pnpm --filter dsh-run-speed test
Making this repository self-contained — declaring vitest and tsdown, and replacing the two inherited tsconfig bases
with in-repo equivalents — is the natural next step, and is not done here. The committed lib/ artifacts are the build
output of 0.2.0-rc.2; deliberate differences from the raw npm tarball — no build-machine paths, a shipped and
rewritten client.js.map, and a corrected test script — are recorded in CHANGELOG.md.
Known Limitations and Deferred Work
- Process-local selection — the Host keeps the selection in a
WeakMap<Session, RunSpeedMode> and it resets to
Standard when DSH restarts. The control queries the Host for the authoritative mode whenever it mounts, and adopts
the mode it just applied after a successful switch; it does not poll the Host afterwards, so it stays in step because
both sides share the same command.
- Policy rather than a throughput guarantee — the plugin requests parallel work, but provider capacity, rate
limits, task dependencies, and the model's own decomposition decision still determine wall-clock speed.
- Status text is a wire contract — the browser half parses the Host's
Run speed: <mode>. reply to learn the
current mode, so that wording is part of the Host/browser interface and must change in both places at once.
English summary
dsh-run-speed adds a per-session Run speed selector to DeepSeek Harness. It chooses how aggressively the
agent may fan work out to parallel background subagents — Standard (no added prompt text), Fast (up to 3), or Turbo
(4–6) — while explicitly preserving the selected provider, model, and reasoning effort. The selection is reachable from
the composer toolbar and from the /run-speed command, is stored in Host memory per session, and resets to Standard
when DSH restarts.
License
MIT. See LICENSE and NOTICE for attribution.