dsh-web
zhu1090093659/dsh-webDeepSeek Harness(DSH)Web 插件聚合生态包 · 一切皆插件,创意工坊分发(dsh-market.com)
Limit concurrent DeepSeek Harness subagent turns and delegation runs
Limit how many DeepSeek Harness subagent runs and local child-agent turns run at the same time in one process. The root Agent is not counted.
In DeepSeek Harness dsh-v0.1.1-rc.2 (commit
b150a551b8d465e31e418e1b2eaf5e79bbb7d28e), the workflow
engine's maxConcurrentAgents and maxTotalAgents apply to
agent() calls inside each workflow run. The standard
subagent tool has no process-wide limit for root-level direct
runs outside a workflow. maxParallelToolCalls limits the
dispatch pool for parallel-safe tool calls in one Agent step, not the number of
background or continuable runs.
This plugin fills that gap by limiting concurrent root delegation admissions and local descendant Agent turns in one process.
The plugin limits the delegation tools listed in subagentToolNames and local
Agent turns in the same process where delegationDepthOf(agent) > 0. They share
one process-local pool. The default limit is 2.
subagentToolNames.agent() calls and resumed local child turns use the same pool when
their Agent turn starts.queueTimeoutMs (default 300000, five minutes) fails
with a clear error instead of waiting forever.subagent/start and
subagent/end boundaries are visible. Nested execution and restarts inside
the remote process cannot be counted.maxParallelToolCalls is independent because it limits tool calls, not live
runs.These examples use the web profile. Replace web with your profile name in
each command and path.
Install the plugin:
dsh plugin --profile web add dsh-subagent-concurrency-limit
Add the plugin configuration to
$DSH_HOME/profiles/web/cordis.patch.yml:
- id: subagent-concurrency-limit
name: dsh-subagent-concurrency-limit
config:
maxConcurrentSubagents: 2
queueTimeoutMs: 300000
subagentToolNames:
- subagent
maxConcurrentSubagents must be a positive safe integer.
queueTimeoutMs must be a positive safe integer; the default is 300000 (five
minutes), which bounds every pool wait.
subagentToolNames must contain at least one nonempty delegation tool name.
The bundle patch applies the defaults above; edit the same keys to override
them.
Start the profile:
dsh --profile web
To update the installed plugin to the latest npm release, run:
dsh plugin --profile web add dsh-subagent-concurrency-limit@latest
Restart the profile after updating.
pnpm install
pnpm run check
To inspect the package before publishing:
npm pack --dry-run
prepare builds lib/ when packing or publishing. npm publish runs the
checks through prepublishOnly before publishing to npm.
The project is licensed under MIT.
The declared compatibility range is DeepSeek Harness >=0.2.0-rc.2.