dsh-subagent-concurrency-limit
Run the following command in DeepSeek Harness:
dsh plugin install blauerberg/dsh-subagent-concurrency-limit
Paste the following prompt into your AI chat to install this plugin:
Run the install command in DeepSeek Harness to add the plugin, whose source lives at https://github.com/blauerberg/dsh-subagent-concurrency-limit, then set maxConcurrentSubagents and subagentToolNames in the profile config to activate it.
About this plugin
In DeepSeek Harness, the workflow engine tracks maxConcurrentAgents and maxTotalAgents for agent() calls inside a run, yet a root-level direct call to the subagent tool is essentially unconstrained at the process level. Fan out a few delegations, let them spawn nested children, and CPU and memory can spike before you even notice. dsh-subagent-concurrency-limit exists to close exactly that gap.\n\nThe plugin maintains a single shared permit pool inside the process, capped at two by default. A root Agent requesting delegation enqueues in FIFO order and waits until a permit is free. Nested children that invoke the same delegation tool also draw from the pool; when it is exhausted a child fails immediately rather than blocking, so a descendant can never deadlock the ancestor it is serving. A permit is released the moment the child turn goes idle, the run ends, or the Agent is disposed. For remote-process providers such as Codex, Claude Code, and ACP, the plugin can only observe the configured root-delegation admission and the subagent/start and subagent/end boundaries; nested execution inside the remote process is invisible.\n\nPick this plugin up if your Harness workflows frequently fan out to multiple subagents, if you register non-standard delegation tool names, or if you simply want to keep a modest hardware footprint from getting overwhelmed. It does not alter any existing behavior—it just adds a gate at the permit level, and the default of two concurrent runs is enough to keep most scenarios well under control.
Use Cases
- Prevent process resource exhaustion when the root agent fires multiple subagent delegations at once.
- Avoid deadlock when nested child agents expand and compete for the same delegation pool.
- Cap total subagent concurrency across multiple workflows running in parallel.
Best For
- Developers orchestrating multi-agent pipelines with DeepSeek Harness.
- Ops and deployment engineers running subagents on constrained hardware.
- Harness plugin developers who register non-standard delegation tool names.
Related Plugins
A method pack that makes AI coding agents plan against your real baseline, prove completion with fresh evidence, and reduce reworks and unsafe changes.
Turns the DeepSeek Harness session into a captain that builds a durable sub-agent team, splits goals into dependency-aware tasks, and coordinates work via direct messages and a live Web UI.
Gives coding agents design judgment, letting Claude Code, Cursor, and 70+ agents generate and iterate high-quality UI, presentations, and graphics right from the terminal.
Run the Pi ecosystem's plugins on DeepSeek Harness, unmodified, via a compatibility layer that implements Pi's public extension ABI on DSH's native services.