Multiple full Claude sessions.
Talking to each other.
Self-coordinating.
Specialized team patterns. Split scope, define handoffs, prevent collisions. Each teammate is a full instance with peer-to-peer messaging.
Subagents vs Agent Teams
These are not the same thing. Most people confuse them.
Subagents
Stable Featuredashed red = no communication
- Fan-out from one parent session
- Return results only, no peer comms
- Parent decides, children execute
- Cheaper: lightweight spawned processes
- One-way: parent sends task, child returns result
- Good for parallelizable, independent tasks
Agent Teams
Experimentaldashed green = peer-to-peer messaging
- Each teammate is a full Claude session
- Talk to each other directly (peer-to-peer)
- Self-coordinate through shared task list
- Can challenge, review, build on each other's work
- Higher cost: each teammate = full instance
- Good for complex, interdependent work
How to Enable Agent Teams
Agent teams require an experimental flag. The API may change without warning in future releases.
{
"env": {
"CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS": "1"
}
}- 1. The feature works and is usable in production workflows
- 2. The API surface (env var name, spawning syntax) may change
- 3. You need to explicitly opt in — it will not activate by default
- 4. Cost implications are real: each teammate is a full Claude instance
How Agent Teams Actually Work
You talk to the lead session. The lead assigns work to teammates. Teammates talk to each other. Everyone sees the shared task list.
Actual Prompts That Work
The key pattern: define each teammate's role, scope, and the lead's coordination responsibility.
The Task List
The shared task list is the coordination layer. Visible to every teammate. How agents self-organize without constant human intervention.
The lead session defines and populates the task list based on the overall goal.
Unclaimed tasks can be picked up by any teammate. Self-organizing when roles overlap.
Every teammate sees the full list. No information silos. Everyone knows who is doing what.
Teams vs Subagents: When to Use Which
Click through the questions to get a recommendation.
What Agent Teams Actually Cost
No sugarcoating. Each teammate is a full Claude instance. A 4-person team costs roughly 4x a single session.
1 teammate = 1 full Claude session (same context window, same token usage, same cost per token). A 4-person team running for 30 minutes each = cost of 4 individual 30-minute sessions running in parallel.
| Use Case | Complexity | Peer Comms Needed? | Verdict |
|---|---|---|---|
| Parallel file edits (independent) | Low | No | Subagents |
| Code generation + tests (same feature) | Medium | Nice to have | Either |
| Full-stack feature (API + UI + tests) | High | Yes | Teams |
| Security audit (multiple domains) | High | Yes | Teams |
| Linting / formatting batch | Low | No | Subagents |
| Architecture review | High | Critical | Teams |
| Data migration scripts | Medium | Minimal | Subagents |
| Competing hypotheses (debug) | High | Essential | Teams |
5 Ready-to-Use Team Configurations
Copy, adapt to your codebase, run. Each is a complete prompt.
Quiz: Agent Teams
Test what you learned.