Files
deepseek-harness/packages/subagent/subagent-spawn
Tianyi Cui ecb8aa5b8e Add a gated Known Limitations and Deferred Work section to every package README
Every packages/*/* README now carries a canonical '## Known Limitations and
Deferred Work' section: condensed, evidence-backed bullets for consumer-visible
gaps (unimplemented features, platform caveats, MVP cuts) and consciously
postponed work (TODO/FIXME/XXX markers, RFC deferrals still open). The ten
pre-existing ad-hoc variants ('What is NOT here (TODO)', 'Deferred',
'Limitations (MVP)', 'Known limitations (tracked TODOs)', ...) are normalized
into the canonical heading.

A new doc-sync gate, scripts/verify-readme-limitations.ts, enforces the shape:
exactly one limitations-like heading per package README, byte-equal to the
canonical h2, with at least one bullet; near-miss headings fail so variants
cannot creep back. Packages with genuinely nothing to declare (dsh-brand,
dsh-timeout, dsh-subagent-mock, dsh-app-boot) are whitelisted in the script and
must NOT carry the section; whitelist entries are validated against the scanned
package set so a rename fails loud.

Wired into the doc-sync chain (package.json) and the run-gates doc-sync leaf
set; the standing rule lands in packages/AGENTS.md and the adding-a-package
cookbook; decision record in
docs/rfc/implemented/process/2026-07-10-readme-known-limitations-gate.md
(RFC index regenerated).

Also fixes two stale '(deferred)' markers claiming dsh-compact-basic is
unimplemented (the dsh-compact seam README's package table and the seam's
module doc comment).
2026-07-12 01:46:34 +08:00
..

@deepseek-ai/dsh-subagent-spawn

The in-process spawn subagent backend: a SubagentProvider that runs each child as a fresh child Agent on the same cordis context (ctx.agents) — its own session, its own (or the parent's) model, zero inherited conversation. The cheapest transport, reusing the agent factory's quiescent AgentHandle teardown.

The run mechanics live in the shared @deepseek-ai/dsh-subagent-inprocess driver (startInProcessRun); this backend just passes no seed (a fresh child). The fork backend is an independent peer over the same driver — neither knows about the other.

What it does

start(request) delegates to startInProcessRun(ctx, request, {}) with no seed: a fresh child agent with the parent's cwd/parentSession lineage and (by default) the parent's model. The driver creates one run-owner fiber under parent.ctx; parent teardown, this provider's teardown, and manual disposal all converge there before child publication. Its run.started boundary resolves only after the fresh child is published, so subagent/start observers see a live registry entry. See the driver README for the full lifecycle (depth check, one-shot drive, result read, dispose).

Capabilities

{ outputSchema: true, depthLimit: true, toolFilter: true, persona: true }. It constructs the child, so it enforces a recursion cap and composes the child's persona, global-tool restriction, and structured runtime inside the agent-creation setup window. At apply it registers this one named provider on ctx.subagents; per-run contributions belong to each child's scope.

Config

Key Meaning
providerName Registry name on ctx.subagents (default spawn).

Known Limitations and Deferred Work

  • Tool-scoping (toolFilter) is not supported — the capability is declared false, so the service rejects a request needing it before start runs; scoping a child's tool set is deferred.
  • Runs expose no sendMessage/resume — the optional runtime capabilities are absent on in-process runs; the consumer collects synchronously.