Sub-agents & the swarm
Focused agents share a work thread's sandbox, report back to its lead, and can resume from checkpoints.
A thread's lead agent can hand a bounded job to a sub-agent: research a flow, implement a slice, review changes, or drive the UI. Each starts with a focused brief and a fresh context rather than inheriting the lead's full conversation, then reports its result to the lead. Agent roles describes the available specialists.
Inside the same work thread
Sub-agents share the lead's sandbox and live working tree: they see uncommitted edits, the dev server, and the thread's browser state. Their edits are visible immediately, with no merge between parent and child. Separate work threads have separate sandboxes and branches. A new thread is a different kind of delegation, not another child writing into this tree.
The lead can send several independent jobs at once, do its own work, then collect the reports. Read-only researchers and reviewers can run in parallel. Writers need separate, explicit file boundaries; a UI driver uses the desktop alone. A researcher is read-only and cannot create a file as its deliverable.
A checkpoint, not a step cap
A sub-agent has no step cap. After 15-minute wall-clock time, its run stops at a checkpoint and writes a progress report: what is done, what remains, and whether it is stuck. The lead reviews that report and either resumes the same child with its full transcript on a fresh clock or finishes the remaining work itself. A checkpoint is not an automatic failure or a silent restart from scratch.
Bound the fan-out and spend
The safety bounds are eight levels of nesting, 500 spawns over the work thread's lifetime, and 10 running sub-agents at once. Extra spawns queue and start when a slot opens; there is no need to retry them. A read-only researcher cannot spawn its own children.
For research fan-out, the lead asks for your consent before dispatching more than two researchers in one round or any researcher above the cost tier. The available routing tiers are cost, balance, and intelligence; each agent is a separate model run, so breadth affects spend. The lead should delegate when jobs genuinely separate, not use the spawn budget simply because it exists.
What the lead keeps
Sub-agents return findings or edits, not the final decision. The lead checks their work against your request, runs the integrated verification, and sends fixes back to the same child when its context matters. See delegation & review for how it makes parallel changes safe.