Agents & Delegation
A delegated subagent is useful for bounded parallel work but normally depends on its parent turn. Durable work belongs in a scheduler, managed background process, or work queue with persistent state. Workers receive only the context, tools, and write scope required for their packet; the orchestrator independently verifies artifacts.
Parallelize only workstreams that do not depend on unfinished results.
Include goal, context, constraints, output contract, and acceptance criteria.
Assign separate files, branches, or worktrees to avoid collisions.
Treat worker summaries as claims until artifacts are read or tested.
Resolve conflicts, run integrated tests, and keep one owner for final acceptance.
Execution choice
| Mechanism | Durability | Use when |
|---|---|---|
| Subagent delegation | Bound to parent session | Short isolated reasoning or implementation |
| Managed background process | Survives current turn while tracked | Long build, test, or server process |
| Scheduled job | Persistent scheduler state | Recurring or future execution |
| Work queue / Kanban | Persistent task lifecycle | Multi-worker coordination and dependencies |
What breaks—and how to recover.
Put every required fact and output rule in the work packet.
Use disjoint scopes or isolated worktrees.
Read, test, or fetch the exact output before acceptance.
Copyable implementation prompt
Decompose [GOAL] into independent work packets. For each provide context, write scope, allowed tools, privacy boundary, output schema, acceptance test, and merge owner. Mark which work requires durable execution.
Use placeholders for paths, accounts, endpoints, identities, and credentials. Never publish secret values, private records, or a live control surface.
Verification gate
- Dependencies are explicit
- Worker contexts are minimal and complete
- Write scopes cannot collide
- Artifacts are independently verified
- Integrated tests pass after merge