Technical
Advanced Claude Code: The Subagent Orchestration Pattern I Use Every Day
Year one of Claude Code I ran one agent at a time and felt fast. Year two I run three in parallel through a single orchestrator and the output multiplied. This is the exact subagent pattern I use on every consulting project now.
The Problem With Single-Agent Workflows
A single Claude Code session is fast until the context fills. Then you restart, lose state, and repeat setup. On any project larger than a single file, the context tax becomes the bottleneck.
The fix is not bigger context. It is smaller agents with tighter scopes.
The Three-Role Split
I split work across three subagents:
- Explorer: read-only, maps the codebase, returns structured findings
- Executor: writes code, runs tests, commits atomic changes
- Reviewer: audits diffs, catches regressions, flags concerns
Each agent gets fresh context. Each agent has one job. The orchestrator (me or a parent agent) stitches their outputs together.
The Typical Flow
1. Explorer: "find all auth code paths" -> returns file list
2. Executor: "refactor auth to use middleware" -> commits 3 files
3. Reviewer: "audit auth refactor" -> flags 1 issue
4. Executor: "fix flagged issue" -> commits 1 fileFour agent invocations, four clean commits, zero context bloat. The same work in a single session would have bled through six context windows.
Why Fresh Context Wins
A fresh agent does not remember the false starts from earlier in the session. It reads only what is needed and acts. Long sessions accumulate confusion: old attempts, abandoned branches, contradictory instructions. Fresh context is a reset button that also happens to be faster.
When Not to Use This Pattern
Do not orchestrate for trivial changes. A typo fix does not need an explorer. A single-file edit does not need a reviewer. The orchestration overhead pays off at three or more files or across two or more subsystems. Below that, a single agent is cheaper.
Anthropic has published the official subagent documentation at the Claude Code reference if you want the formal framing. I arrived at the same pattern through pain.
The Orchestration Cost
Running three agents is not free. The orchestrator spends time writing task descriptions, routing outputs, and stitching diffs. On my measurements the orchestration overhead is about twenty percent of the total work on a typical task. The payoff is that the remaining eighty percent is faster and cleaner than a single-session equivalent, and the commits are independently reviewable.
The Naming Discipline
I name each subagent window explicitly before starting. explorer-auth, executor-auth, reviewer-auth. The naming keeps me from accidentally pasting an executor prompt into an explorer window, which was a failure mode early on. Boring hygiene, real payoff.
What I Tell Other Builders
Start with the explorer and executor split. Add the reviewer only when your blast radius justifies it. The pattern scales down as well as up. Most of the value comes from the first split, not the third agent.
RELATED READING
The Consulting Shift I Am Making In Year Two
After a year of writing and building, my consulting practice is changing shape. Shorter engagements. Sharper outcomes.
ReadThe Frontend Shift: Shipping Less JavaScript In Year Two
A year ago I reached for Next.js for everything. This year I often reach for nothing.
ReadThe Serverless Lesson I Would Write On A Sticky Note
After a year of shipping serverless projects, one rule explains most of the wins and all of the losses.
Read