mirror of
https://github.com/deepseek-ai/deepseek-harness
synced 2026-08-15 21:04:50 +00:00
`session.create` also adopts an already-live session, and the preceding commit newly allows adopting one under the preset it switched to while blank. Its response still echoed `header.agentPreset`, so that adoption answered with the preset the session had just left — contradicting the request it had accepted and the row `session.list` serves for the same session from `resolveSessionPreset()`. The echo now resolves the same way. The `assertPresetUnchanged` parameter doc said `existing` was the preset the session was created under; both callers now pass what it runs. `composeFrom()` was documented as "infallible" and "cannot fail" beside two `@throws`. It has no composition failure mode — no roster read, no mount, no file — but it does reject a caller error, and the wording now says which. The package-level "switched preset" test re-linked to the same preset id, so it could not tell reading the parent's live scope chain from reading its creation header. A second fixture preset makes the switch real. The Web browser lane's subagent goldens gain the preset badge a child now shows, which is the visible consequence of recording its composition. That lane runs only under DSH_EXAMPLE_MODE=lib and was missed before. The Agent Note records two limits found in review: a cold-resumed continuable child joins its parent's current composition rather than the one its header names, and `toolFilter` does not constrain a joined child. The latter is a regression from the agent-plane move rather than anything this change introduces — with the same tools in the global layer the filter applies normally — and is tracked in #2185. Refs #2185
subagent/ — subagent capability family
English | 中文
This family lets an agent delegate work to child agents. Multiple named providers may coexist in one context.
| Package | Role | ctx key |
|---|---|---|
subagent/ |
Defines provider registration, delegation, and continuation | ctx.subagents |
subagent-inprocess/ |
Provides the shared in-process run driver | — |
subagent-spawn/ |
Starts a fresh in-process child | registers on ctx.subagents |
subagent-fork/ |
Starts an in-process child from the parent's completed history | registers on ctx.subagents |
subagent-acp/ |
Starts an out-of-process child over ACP | registers on ctx.subagents |
subagent-codex/ |
Starts a real Codex app-server child | registers on ctx.subagents |
subagent-claude-code/ |
Starts a real Claude Code child through the official Claude Agent SDK | registers on ctx.subagents |
subagent-dsh-sdk/ |
Starts an out-of-process Harness child through the TypeScript SDK | registers on ctx.subagents |
tool-subagent/ |
Exposes delegation to the model | registers on ctx.tools |
tool-subagent-control/ |
Exposes child messaging and listing to the model | registers on ctx.tools |
tool-subagent-report/ |
Provides the child-to-parent report channel | registers in child scopes |
See the decisions for the capability family, continuable children, and control tools.
The subsystem reference — start requests, results, live runs, the provider contract, continuable background children — is docs/subsystems/subagent.md; design rationale in the subagent capability seam, continuable background subagents, and merged subagent control service Agent Notes.