In DeepSeek Harness (DSH) multi-agent orchestration scenarios, the main Agent typically needs to wait until all sub-agent tasks are completed before ending the current turn. If the main Agent attempts to wrap up prematurely, it can cause workflow interruption or incomplete results. The dsh-wait-guard plugin was created to solve this problem. As a pure Host-plane gate, it forcibly keeps the main Agent’s turn open until all descendant sub-agents transition to a non-running state.
Core Features¶
- Force-wait for descendant settlement: The main Agent’s turn cannot end as long as any descendant sub-agent is still
running. - Pure Host plugin: No tool registration, no config changes, no file writes, and no global state. Removing the plugin restores everything to its original state.
- Immediate message response: Any message arriving during the pause (user messages, sub-agent reports, or settlement notifications) immediately deactivates the plugin.
- Temporary deactivation mechanism: Deactivation is temporary. The next time the model tries to wrap up, if any sub-agents are still running, the gate immediately re-engages.
- Leak-free design: Listeners are destroyed with the plugin, and timers do not leak. In-flight waits are released immediately upon unload, preventing any stuck turns.
Installation¶
The plugin supports direct installation from GitHub, with no npm required.
dsh plugin --profile <your-profile> add github:dn4hjtcr9s-del/dsh-wait-guard
You can also do this via the Web UI: Plugins → Add plugin → paste the argument after the add command above.
Typical Usage¶
Once installed, the plugin works out of the box without configuration. The default behavior is to send a silent nudge every 60 seconds, and it deactivates immediately upon receiving any message.
To adjust behavior, modify the config in the bundle line:
- Silent-only mode: Set
nudge: falseto only wait without sending reminders. - Batch processing mode: Set
releaseOn: ['user','agent-message']to release only when a user message or sub-agent message arrives, rather than releasing on every settlement notification.
Use Cases & Notes¶
- Applicable scenarios: Any DSH Agent workflow involving multi-level sub-agent calls, preventing the main Agent from ending prematurely and disrupting the flow.
- Environment requirement: Node.js >= 22.19.0 required.
- Security characteristics: Zero dependencies, zero writes, zero global state.
- Fault-tolerance strategy: If the sub-agent list cannot be read, the default is to release (
onProbeError: 'open'); change to'closed'for strict mode. - Message handling: Does not block queued user messages. If the only reason for release is a queued message in next-turn, no reminder is injected.
- Version changes: Deprecated (v5) config options include
waitFactor/maxWaitMs/maxNudgesPerTurn/giveUpAfterMs/giveUpText; these are ignored even if present in config.
Conclusion¶
dsh-wait-guard provides a reliable, side-effect-free way to manage turn wrap-up logic in multi-agent orchestration. As a pure Host plugin, it does not interfere with business logic and is suitable for DSH workflows that require strict control over sub-agent completion states.