Skip to content

Skill · pattern · subagents

Spawn subagents

Spawn a nested loop as a context boundary: written brief, fresh window, reduced tools, no parent secrets, structured return. Use when the parent would drown in search hits, specialists need isolation, or spawning researchers / reviewers.

GET /api/canon/skills/subagents?format=md

Claude Code, Deep Agents, and Codex all spawn subagents this way. Isolation that inherits every secret is theater.

When

Protect the parent window, parallelize, or apply a different skill set.

Do

  1. 01

    Write the brief

    Goal, constraints, return schema. The child does not inherit the transcript.

  2. 02

    Reduce the principal

    Fewer tools. No deploy keys. Read-only if the job is research.

  3. 03

    Take a document back

    notes.md plus a 30-line summary. Caps on depth, breadth, time.

Don't

  • Fork the parent process with every tool and token.
  • Return 40 search hits into the parent window.

Hard rules

  • Subagents exist to protect the parent window.
  • Depth-capped. Breadth-capped. Money-capped.

Refuse

Load with this

Load next

Trigger tests

Should fire

  • Spawn a researcher subagent
  • The parent context is drowning

Should not

  • Call a helper function in the same process