Step 1 of 4
Implement spawn: fresh context specialists
A spawn is a new employee: they know only what the dispatch tells them.
Build the spawn path. Maintain a registry of agent definitions (explorer, planner, verifier, general) each with: its own system prompt, tool list, default model (cheap+fast for read-only scouts, inherit for reasoning-heavy roles), and permission mode. On dispatch: look up the definition, build a FRESH context containing only the definition's system prompt plus the dispatch message - no parent history. Assemble the child's tool pool independently under its own permission mode, not a copy of the parent's. Because the child starts from zero, enforce dispatch-prompt discipline: task, relevant background, constraints, expected output format - a checklist the orchestrator prompt requires. Return the child's final report as a tool result the parent folds into its context.
Expected after this step
Working spawn dispatch with per-definition prompts, tools, models, and fresh contexts.
Should not happen
- ✕Spawning with a one-line prompt and wondering why the sub-agent flails without context
- ✕Forking for everything, including tasks needing a specialist definition the fork lacks
- ✕Unbounded recursive forking melting the budget
- ✕Dispatching a sub-agent (with full startup cost) for a two-step task the parent could do inline
Verify before continuing
Do not move on until every check is true. The complete button stays locked until then.
Do not continue if…
- !Spawning with a one-line prompt and wondering why the sub-agent flails without context
- !Forking for everything, including tasks needing a specialist definition the fork lacks
- !Unbounded recursive forking melting the budget
- !Dispatching a sub-agent (with full startup cost) for a two-step task the parent could do inline
If the AI messes this up
Use this when the AI fakes progress or breaks the feature. It forces a real fix.
Spawned agents keep asking about things the parent already knows. That is the design - the fix is in the dispatch prompt, not shared state: require the orchestrator to include the missing background, or conclude this task wanted a fork instead.