All Days
Day 37

Agent Teams — Roles & Handoffs

Claude Code // Day 37

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.

Experimental
Feature Status
Peer-to-Peer
Messaging Model
Shared Task List
Coordination Layer

Subagents vs Agent Teams

These are not the same thing. Most people confuse them.

Subagents

Stable Feature

dashed 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

Experimental

dashed 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"
  }
}
What "experimental" means
  • 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.

You
Your Terminal
Primary interface
Lead Session
Coordinator
Orchestrates work
Teammate A
Backend
Full Claude session
Teammate B
Frontend
Full Claude session
Teammate C
Tests
Full Claude session
Shared Task List
1. Build API routes [ A ]
2. Create components [ B ]
3. Write test suite [ C ]
4. Integration tests [ -- ]
Lead assigns
Peer-to-peer
Active session

Actual Prompts That Work

The key pattern: define each teammate's role, scope, and the lead's coordination responsibility.


Moving Between Teammates

Once your team is running, you need to know how to talk to each member.

Cycle Between Teammates

Press Shift + Down to cycle through teammates. Each press moves focus to the next active session.

Direct Message Any Teammate

You can message any teammate directly. Not just the lead. Useful when you want to give specific instructions or override a direction.

Split Mode (tmux)

Each teammate can run in its own tmux pane. See all sessions simultaneously. Best for monitoring parallel work.

Combined Mode

All teammates share the lead terminal. Output interleaved. Simpler setup, harder to follow with more than 2 teammates.


The Task List

The shared task list is the coordination layer. Visible to every teammate. How agents self-organize without constant human intervention.

Shared Task List
1. Design database schema[ A ] done
2. Build API endpoints[ A ] working
3. Create React components[ B ] working
4. Write unit tests[ C ] assigned
5. Integration tests[ -- ] unclaimed
6. Final review[ -- ] unclaimed
Lead Creates

The lead session defines and populates the task list based on the overall goal.

Teammates Self-Assign

Unclaimed tasks can be picked up by any teammate. Self-organizing when roles overlap.

Visible to All

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.

Do workers need to communicate with each other?

What Agent Teams Actually Cost

No sugarcoating. Each teammate is a full Claude instance. A 4-person team costs roughly 4x a single session.

The Math

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 CaseComplexityPeer Comms Needed?Verdict
Parallel file edits (independent)LowNoSubagents
Code generation + tests (same feature)MediumNice to haveEither
Full-stack feature (API + UI + tests)HighYesTeams
Security audit (multiple domains)HighYesTeams
Linting / formatting batchLowNoSubagents
Architecture reviewHighCriticalTeams
Data migration scriptsMediumMinimalSubagents
Competing hypotheses (debug)HighEssentialTeams

5 Ready-to-Use Team Configurations

Copy, adapt to your codebase, run. Each is a complete prompt.


Quiz: Agent Teams

Test what you learned.

Question 1 of 4
What environment variable enables agent teams?
The correct answer is CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS. It must be set to "1" in the env object of your settings.json. The "experimental" prefix signals this feature may change.
Question 2 of 4
How do teammates communicate with each other (not through the lead)?
The correct answer is peer-to-peer messaging. This is the defining feature of agent teams vs subagents. Teammates send direct messages to each other without routing through the lead.
Question 3 of 4
What is the main difference between agent teams and subagents?
The correct answer is full sessions with peer-to-peer communication and self-coordination. Subagents are lightweight workers that return results to a parent. Teams are full Claude sessions that can talk to each other and self-organize.
Question 4 of 4
How do you cycle between teammates in the terminal?
The correct answer is Shift+Down. Each press cycles focus to the next active teammate session. You can also message any teammate directly without cycling.
0/4
Correct Answers

don't miss what's next.

playbooks, templates, and tools that actually save you hours. straight to your inbox. no spam. unsubscribe anytime.

Day 37 of 30 · AY Automate · Claude Code Series