Skip to content

Releases

v0.1.0 — auto-continue-once recovery for max-tokens subagents

Choose a tag to compare

@quaner1234-cmd quaner1234-cmd released this 23 Aug 13:42

First public release. Published on npm as dsh-subagent-watchdog@0.1.0.

What it does

When a native continuable DSH subagent ends with explicit stopReason: 'max-tokens', Watchdog automatically continues that same child conversation exactly once, using official DSH seams only:

  1. observes the terminal turn/end { kind: 'max-tokens' };
  2. starts one official ctx.sessions.flush(childSession) durability checkpoint while the child session is live;
  3. allows normal settlement, waits for checkpoint resolution;
  4. sends exactly one official subagents.followup() cold-resume of the same durable child conversation.

A second failure (max-tokens again, or an explicit runtime/provider error) stops intervention and delivers one notice to the delegating parent with the official manual options. Never loops.

Boundaries

  • Continuable subagents only; max-tokens is the only automatic trigger
  • At most one automatic continuation per child task/recovery chain
  • Normal completion, clean aborts, refusals, unknown stop reasons: untouched
  • Provider/model errors: reported, never auto-retried
  • No timers, no polling, no custom persistence, no private runtime APIs

Install

dsh plugin --profile <profile> add dsh-subagent-watchdog

Zero dependencies, no build step, Node >= 20. Live-tested against @deepseek-ai/dsh 0.1.1-rc.2 only.

Evidence summary

  • 38/38 deterministic scenarios over both shipped artifacts (node --test test/watchdog.test.mjs)
  • Final packaged live run: real max-tokens settlement, one durable continuation marker, the same durable child session id cold-resumed under a fresh runId, healthy completion
  • Checkpoint-before-followup ordering and genuine AbortSignal plumbing are supported by prior instrumented probes plus the deterministic suite; they were not independently emitted as records in the final packaged trace (see README > Verification and evidence)