dsh-subagent-error-details
Manifest validdsh-subagent-error-details
DSH plugin: tell the parent agent why a background subagent failed.
The problem
When a background subagent dies mid-turn (e.g. a model API 429 rate-limit), the official settlement notice reads:
Background subagent <id> failed before it finished.
Its closing message:
and then nothing. The failure reason is discarded by core dsh-subagent (notifySettlement maps stopReason to a fixed sentence and splices the child's last partial output, which for a mid-turn death is reasoning + tool-call blocks only). The real error is recorded in the child session's terminal turn/end event — but nothing delivers it to the parent.
Upstream discussion: deepseek-harness#4334.
What this plugin does
- Listens to the public
subagent/endevent as a host-plane bundle: the scope-carried event bubbles up the scope chain, so one instance observes the delegations of every parent agent, regardless of the preset each session runs on. - On
stopReason === "error", resolves the child session's terminalturn/endfailure detail viasessionPersistence.load()(live session store first, durable JSONL log second) and routes back to the owning parent through the child session header'sparentSessionand the agent registry. - Delivers a short companion message to the parent, mirroring core's followup/steer split:
Subagent <id> failed with: RATE_LIMIT: 429 Rate limit exceeded for api_key ... Limit resets at ...
Once core itself includes the failure text in the official notice (the upstream fix), the inbox watcher detects it and suppresses the companion message automatically.
Install
One command, works for every agent preset — no composition editing:
dsh plugin --profile web add dsh-subagent-error-details
(the CLI command is a pnpm wrapper; cd ~/.dsh/profiles/web && pnpm add dsh-subagent-error-details is equivalent). The bundle patch mounts the plugin into the profile composition, which is rebuilt at boot, so restart dsh to activate.
Fresh-release note (pnpm ≥ 11): pnpm 11 enables a supply-chain default that rejects package versions published less than 24 hours ago (
minimumReleaseAge). During the first day after a release, installs may fail with a "minimumReleaseAge" policy error. Either wait 24 hours, or bypass it for this one command:dsh plugin --profile web add --config.minimumReleaseAge=0 dsh-subagent-error-details
Local development installs from a checkout instead:
cd ~/.dsh/profiles/web
pnpm add file:/path/to/dsh-subagent-error-details
# restart dsh
Design guarantees
- Never breaks the parent loop: every path is wrapped; a plugin bug degrades to "no details" instead of an error.
- Zero inject, lazy service lookup: services are resolved via
ctx.getinside the handlers and every absence degrades gracefully, so activation can never fail a session mount. - Defensive parsing: session-schema drift degrades gracefully; never crashes on unknown shapes.
- Version contract:
dsh.engines.dsh: ">=0.1.1-rc.2 <0.2", with@deepseek-ai/cordisas the only peer dependency (the harness packages appear as dev dependencies for their types; the plugin has zero runtime dependencies). Because dsh is pre-release with no compatibility promise, re-verify against each new dsh rc.
Known limitations
- The official notice text itself is unchanged (core generates it); this plugin adds a companion message.
- One-shot in-process runs without a session record can only report
stopReason, no detail. - The durable read depends on the session checkpoint policy having flushed the
turn/endevent; a bounded retry covers the common window.
Development
pnpm install
pnpm build # tsc
pnpm test # node --test test/extract.test.mjs
License
MIT
Comments
Loading…
From the same category
by Devin-AXIS
Enterprise-grade, local-first Agent Workbench for people and agent teams. A unified multi-engine workspace for Codex Harness, DeepSeek Harness, and OpenCode, with unified plugins and Skills, multi-age
★ 6.8k
↓ 424/wk
NOASSERTION
TypeScript
Oct 10, 2026
dsh plugin --profile web add deepseek-idesignby NanmiCoder
AgentTeams plugin for DeepSeek Harness
★ 2k
↓ 8.6k/wk
MIT
JavaScript
Oct 11, 2026
dsh plugin --profile web add @nanmicoder/dsh-agent-teamsby Clearailhc
ClearAI is a native DSH plugin that brings the Epistemic Loop to DeepSeek Harness.
★ 1.3k
↓ 889/wk
Apache-2.0
JavaScript
Oct 10, 2026
dsh plugin --profile web add clearai-dshby tong-io
Modality-First GenAI Platform
★ 1k
↓ 458/wk
AGPL-3.0
TypeScript
Oct 8, 2026
dsh plugin --profile agent add dsh-tongflowby LiPu-jpg
dsh-Openwrite:OpenWrite 的 DeepSeek Harness 小说创作插件,含统一创作 Agent、90 个小说工具、原生工作台与标准审稿 DAG
★ 811
↓ 1.4k/wk
Apache-2.0
TypeScript
Oct 10, 2026
dsh plugin --profile agent add dsh-openwriteA DSH plugin for novel writing and short-drama production, powered by Oh Story and Drama Skills.
★ 460
MIT