
Mission 6 of 7
Run three builders at once, plus a reviewer who didn't write the code.
One session doing one thing is slow once your plan has independent parts. You'll set up subagents and git worktrees, then run a real feature across three sessions at once.
What you'll do
Create two subagents with fresh context: one that reviews without having written the code, and one that only writes tests.
Use git worktrees to run three Claude Code sessions on three branches of one repo without them colliding.
Combine the branches, then run the reviewer on the merged result, where the integration bugs live.
- Know when a subagent beats the main session
- Leave each lane with a boundary and a way to pass notes
Your progress0/7
What a subagent is and why fresh context matters
A subagent is a separate conversation with its own instructions, launched by the main one for a specific job.
Before you build anything, you need to know what a subagent is and why it behaves differently from your main session. The difference is context.
Why the main session is a weak reviewer
When your main session has spent an hour building a feature, its context is full of that feature: the decisions, the dead ends, the files it read. That's good for building and bad for reviewing.
It's invested. It knows what it meant to do and reads the code as if it did that.
What a subagent does instead
A subagent starts clean. It gets a short system prompt (its job), the tools you allow it, and whatever the main session tells it.
It does its task, reports back, and its context is thrown away. The main session gets the result without the noise.
Three jobs where that's exactly what you want:
- Review. A reviewer who didn't write the code and can't see the author's reasoning finds the bugs the author is blind to.
- Research. 'Find every place we call the payments API' is a lot of reading that would bloat the main context. A subagent reads it all and returns a list.
- Tests. A tester with instructions to never change the code under test can't 'fix' a failing test by editing the function.
Where subagents live
Subagents are markdown files in .claude/agents/. Each has a name, a description, allowed tools, and the prompt.
Claude Code uses the description to decide when to call one, and you can call them explicitly by name.
.claude/agents/ are shared with the team via git. Personal ones in ~/.claude/agents/ follow you everywhere. Put the reviewer in the project; everyone benefits.