When to Delegate to Subagents: Token Savings, Parallel Red Lines, and a Three-Layer Setup
Long AI coding sessions hit a hard wall when context fills up and compression degrades output quality. A three-layer subagent setup keeps the main context lean and cuts token costs, but only when cheap models are explicitly assigned, because delegating itself adds overhead.
Dozens of file reads, long logs, and multi-option evaluations balloon a main agent's context fast. The fix is subagents: isolated worker agents that take a task, run it in their own context, and return only a short summary. That keeps the main thread clean and lets several tasks run in parallel. But not every task suits delegation. Tasks that touch the same files, require strict sequential steps, or carry high-risk actions like deployments should stay in the main context.
The guide lays out a three-layer configuration: global settings that cap concurrent subagents and nesting depth, per-role configs that pin a cheap model and a role-specific prompt, and a dispatch Skill that tells the main agent when to spawn which role. The key savings come from pairing heavyweight work with cheap lightweight models. An Explorer role scans code with the cheapest tier, an Executor handles bounded edits, and a Reviewer does independent code review. Because subagents start fresh without the main conversation's history, they review changes without the author's bias.
Delegation isn't automatically cheaper. Each new subagent re-reads project context and reports back, so total token count usually rises. It pays off only when the subagent's model is drastically cheaper. Simple tasks with one or two edits should stay in the main agent. The guide also shows how to delegate to an entirely different agent via CLI, wrapping commands in a Skill with scripts, and open-sources that mechanism as oil-delegate.
The strongest cost lever isn't parallelism; it's the price gap between a cheap subagent model and the main agent's model, because every spawned subagent re-reads project context.
The recommendation that subagents should not recursively spawn more subagents conflicts with the promise of autonomous scaling; the guide deliberately caps nesting to one level for stability.
Using a low-tier model as a subagent while keeping a stronger main agent sidesteps the weak recall problem, suggesting orchestration matters more than raw model strength.
A fresh-context reviewer is a practical workaround for a known LLM bias: an agent that wrote code tends to follow its own reasoning inertia, so a separate, history-free reviewer catches more real issues.