Claude Code · July 11, 2026 · 3 min read
Run a team of AI agents from one prompt
One prompt in Claude Code can fan out into a team of AI agents. The strongest model plans and reviews, cheap models do the grunt work. Copy the setup.
The problem
Most people run Claude Code as one agent doing everything: planning, coding, testing, reviewing, all in one chat. Two things break. The context fills with grunt work the session never needs again, and your strongest, most expensive model burns tokens on jobs a cheap model does fine.
How do you run a team of AI agents from one prompt?
You define the roles once as subagents, then write one prompt that tells Claude Code to fan the work out across them, with the right model on each seat. I built my agent cockpit, a dashboard that shows everything running across my machines, with this pattern: all five build phases shipped as stacked pull requests, each one looping through implement, verify, fix, verify again. The verification fleet was mixed on purpose. Haiku ran the guardrail checks, Sonnet ran the acceptance tests, and Opus did the adversarial spec review. That fleet caught real bugs during the build, including a status that flickered healthy during outages and a counter that treated finished sessions as live.
The rule underneath it is model routing: the strongest model plans and grades, cheaper models do the parallel grunt work. If you want that split without the full team, start with letting the top model plan and a cheaper model build.
The agent that builds should not be the agent that grades.
Set up the roles
Subagents are markdown files in .claude/agents/ in your repo. The model line is where the routing happens:
---
name: builder
description: Implements an approved plan. Edits files, makes it run.
tools: Read, Edit, Write, Bash, Glob, Grep
model: sonnet
---
You are the builder. Execute the plan exactly. Stay in the listed
files. Report what changed and what the reviewer should check.
Add a planner and a reviewer on opus with read-only tools (no Edit or Write), and a tester on haiku. Only the builder mutates files. That separation is what keeps every role honest.
The prompt that spawns the team
Build <feature>. Use as many subagents as you need, and pick the
right model for each so tokens are spent efficiently while quality
holds: opus plans and reviews, sonnet builds, haiku explores and
runs checks. Plan first. Loop builder and reviewer until the
reviewer approves. Report back only the plan, the diff summary,
and the review verdict.
This is a different job from giving your agents a task queue. The queue holds work across sessions and machines; the team splits one job inside one session. They stack well.
Do this now
- Create
.claude/agents/in a real project and add planner, builder, and reviewer files with themodelline set per role. - Paste the team prompt above on your next feature.
- Watch the relay. If a role does another role’s job, tighten its
toolslist until it stops.