Subagents, continuations, and jobs
Delegation transport, continued conversation, and long-running control are three different abstractions
provider transport + activation + job registryAfter starting a subagent, who owns it, who may continue it, and who must stop it?
Delegation is outsourcing: the provider is the transport, the descriptor is contractual identity, continuation is the follow-up channel, and the job registry is the project control board.
Mechanism
ctx.subagents selects in-process spawn/fork, ACP, Codex, Claude Code, or DSH SDK providers. Requests carry depth, cwd, persona, tool visibility, and a durable descriptor.
Activation orchestrates continuation and tool-subagent-control sends follow-ups. Long-running delegation registers with ctx.jobs; ownerSession controls access and agent disposal cancels and awaits the job.
Declare request
Description, parent agent, depth, tool filter, and persona.
What extensions must preserve
- Absolute delegation depth is consistent across providers
- Tool filtering is visibility, not security permission
- Job.done resolves only after the producer releases resources
The tempting wrong turns
- ×Calling a new model request a full subagent
- ×Cancelling only the job record but not producer work
- ×Using guess-resistant JobId as access control
Do not trust the conclusion—verify it
These anchors are pinned to official deepseek-harness@47f9438; account for later breaking changes when reading current upstream.
Pause for ten seconds before revealing
Why can toolFilter not be treated as a security sandbox?
Subagents solve delegation. Next, model-written workflows orchestrate many agents and durable schedules wake future turns.