AI Agent Hub
Back to plugins
⚙️

dsh-subagent-watchdog

Workflow Updated 2026.08.25

Run the following command in DeepSeek Harness:

dsh plugin install quaner1234-cmd/dsh-subagent-watchdog

Paste the following prompt into your AI chat to install this plugin:

Run dsh plugin install quaner1234-cmd/dsh-subagent-watchdog in DeepSeek Harness to install this plugin, the source code is available at https://github.com/quaner1234-cmd/dsh-subagent-watchdog

About this plugin

In a DSH workflow, the most common frustration when delegating a multi-step task to a continuable subagent is that the child burns through its output-token budget mid-task and stops. The unfinished work sits there, and the delegating parent has to notice the failure, decide it is recoverable, and manually continue the child. dsh-subagent-watchdog turns that single recovery step into a deterministic automation: it watches exclusively for the max-tokens terminal signal, sends exactly one continuation through the official subagents.followup() seam, and lets the same durable session cold-resume from its existing state. No loops, no polling, zero extra dependencies.

The safety boundary is the design priority. The continue-once guarantee is enforced against the child's durable session id plus a continuation marker written into the child's own log, so plugin restarts or duplicate settlements can never trigger a second automatic continuation. If the recovered run fails again, whether with another max-tokens or a runtime error, Watchdog stops intervening immediately and delivers a single notice to the parent with the failure facts and official manual options. It never guesses and never auto-retries.

If you routinely delegate to continuable subagents inside DSH workflows, once this plugin is in place a subagent that hits its token ceiling simply picks up where it left off, and you no longer need to hand-write retry logic or babysit child-agent liveness.

Use Cases

  • A continuable subagent hits its output-token ceiling mid-task and terminates with max-tokens; Watchdog cold-resumes the same durable session exactly once with no parent intervention.
  • In a multi-step delegation workflow, if the recovered run fails again, Watchdog halts immediately and surfaces one structured notice with official manual options to the delegating parent. It never loops.
  • Across plugin restarts and duplicate settlement events, the durable session ID plus a log-level continuation marker guarantee a second automatic continuation can never fire, eliminating duplicate recovery.

Best For

  • Developers who routinely delegate multi-step tasks to continuable subagents in DSH.
  • Workflow orchestrators who need high-reliability guarantees for child-agent task completion.
  • DSH plugin integrators who want to eliminate hand-written retry and liveness-polling logic while relying solely on official seams.