🇨🇳 中文

Claude Code Agent Teams 2026: Parallel Multi-Agent Development (With Cost Optimization)

Complete guide to Claude Code Agent Teams: run multiple Claude instances in parallel, Opus+Sonnet mixed orchestration for cost savings, real-world workflows, and command reference. Compress hours of serial work into minutes.

Bruce

Claude CodeAgent TeamsAI CodingMulti-AgentAnthropic

AI Guides

2030  Words

2026-02-22


On February 5, Anthropic shipped Claude Code Agent Teams alongside Claude Opus 4.6 — an experimental feature that lets multiple Claude Code instances form a team and work in parallel. If Subagents are errand runners you send out on focused tasks, Agent Teams are an engineering squad whose members can discuss, coordinate, and challenge each other in real time. For complex scenarios involving cross-module development, multi-perspective code review, or parallel debugging, Agent Teams can compress hours of serial work into minutes.

This guide draws on the official documentation and hands-on experience to break down Agent Teams from architecture to real-world workflows. If you are new to Claude Code, start with the Claude Code Complete Guide first.

What Are Agent Teams

The core architecture is straightforward: one Team Lead + multiple Teammates.

ComponentRole
Team LeadThe primary Claude Code session that creates the team, assigns tasks, and synthesizes results
TeammatesIndependent Claude Code instances, each with its own context window
Task ListA shared task list with dependency tracking and automatic unblocking
MailboxAn inter-agent messaging system supporting point-to-point and broadcast communication

How Agent Teams Differ from Subagents

This distinction is key to understanding when Agent Teams add value: Subagents can only report upward; Teammates can communicate with each other.

DimensionSubagentAgent Teams
ContextIndependent context; results return to callerIndependent context; fully autonomous operation
CommunicationReports results to the parent Agent onlyTeammates message each other directly
CoordinationParent Agent manages everythingShared task list + self-coordination
Best forFocused tasks that just need a resultComplex work requiring discussion and collaboration
Token costLower — summarized results return to parent contextHigher — each Teammate consumes tokens independently

Think of it this way: a Subagent is like a delivery driver — they complete the job and report back. Agent Teams are like an engineering squad where members can ask each other “Did you update that API contract?” or “I found an issue on my end — can you check yours too?”

Getting Started

Step 1: Enable the Feature

Agent Teams is currently experimental and must be enabled manually. Two options:

Option A: Environment variable

export CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS=1

Option B: settings.json (recommended — persists across sessions)

{
  "env": {
    "CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS": "1"
  }
}

Step 2: Create a Team with Natural Language

Once enabled, describe the team you need in plain English:

Create an Agent team to build the user notification feature.
Assign three Teammates:
- One for backend API development
- One for frontend UI components
- One for writing integration tests

Claude automatically creates the team, populates the task list, and spins up each Teammate.

Step 3: Choose a Display Mode

Agent Teams supports two display modes:

  • In-process (default): All Teammates run in a single terminal. Use Shift+Down to switch between Teammates and Ctrl+T to view the task list. Works in any terminal.
  • Split panes: Each Teammate gets its own pane. Requires tmux or iTerm2. Lets you watch all Teammates simultaneously.
# Force in-process mode
claude --teammate-mode in-process

Or configure it in settings.json:

{
  "teammateMode": "in-process"
}

Step 4: Talk Directly to Any Teammate

Every Teammate is a full Claude Code session. You can interact with any of them at any time:

  • In-process mode: Press Shift+Down to switch to the target Teammate, then type your message
  • Split panes mode: Click the corresponding pane and start typing

Real-World Use Cases

Use Case 1: Frontend + Backend + Testing in Parallel

This is the most natural fit for Agent Teams — coordinated cross-layer development:

Create an Agent team to implement the user profile editing feature:

Teammate 1 - Backend Developer:
- Design and implement PUT /api/users/:id endpoint
- Handle data validation and database updates
- File scope: src/api/users.ts, src/models/user.ts

Teammate 2 - Frontend Developer:
- Build the profile editing form component
- Integrate with the backend API, manage form state
- File scope: src/components/ProfileEdit.tsx, src/hooks/useProfile.ts

Teammate 3 - Test Engineer:
- Write unit tests for the API endpoint
- Write integration tests for the frontend component
- File scope: tests/api/users.test.ts, tests/components/ProfileEdit.test.tsx

Require each Teammate to notify the others when done,
ensuring the API contract stays consistent.

Why this works: The three Teammates own separate file sets, so there are no write conflicts. They use the messaging system to confirm interface definitions and keep the frontend-backend contract aligned. What might take 30-40 minutes sequentially finishes in 10-15 minutes with Agent Teams.

Use Case 2: Parallel Hypothesis Debugging

When the root cause of a bug is unclear, Agent Teams’ “competing hypotheses” approach is remarkably effective:

Users report the app disconnects after sending one message.
Create 5 Teammates to investigate different hypotheses:
1. WebSocket connection management issues
2. Auth token expiration handling
3. Server-side heartbeat mechanism
4. Client reconnection logic
5. Load balancer session affinity

Have them challenge each other's theories like a scientific debate,
then document the consensus findings in findings.md.

Why this works: A single Agent debugging alone tends to anchor on the first plausible explanation. Multiple Agents challenging each other effectively counters confirmation bias — the hypothesis that survives scrutiny is far more likely to be the actual root cause.

Use Case 3: Multi-Perspective Code Review

Create an Agent team to review PR #142 with three reviewers:
- One focused on security analysis (token handling, input validation, injection risks)
- One focused on performance impact (N+1 queries, memory leaks, concurrency issues)
- One focused on test coverage (edge cases, error paths, integration tests)

After the review, compile all findings into a unified review report.

A single reviewer tends to gravitate toward one category of issues. Running parallel reviews from different angles ensures security, performance, and test coverage all get thorough attention.

Advanced Features

Require Plan Approval Before Implementation

For high-risk tasks, you can require a Teammate to submit a plan for the Lead’s approval before writing any code:

Assign an architect Teammate to refactor the auth module.
Require them to submit a plan and wait for approval before implementing.
Only approve plans that include a testing strategy.

The Teammate enters a read-only Plan mode and submits a proposal. If rejected, they revise and resubmit. Only after approval do they begin implementation.

Enforce Quality Gates with Hooks

Through the Hooks mechanism, you can insert automated checks at critical points:

  • TeammateIdle: Fires when a Teammate is about to go idle. Return exit code 2 to send feedback and keep the Teammate working.
  • TaskCompleted: Fires when a task is marked complete. Return exit code 2 to block completion and send feedback.

Specify Models per Teammate

You can assign different models to Teammates, using cheaper models for simpler tasks:

Create 4 Teammates to refactor these modules in parallel.
Have each Teammate use the Sonnet model.

Best Practices

When to Use Agent Teams

Good fit:

  • Work naturally splits by domain (frontend / backend / tests)
  • You need simultaneous multi-perspective review (security / performance / test coverage)
  • A bug has no obvious cause and multiple hypotheses need parallel exploration
  • New module development where modules have low coupling

Poor fit:

  • Tasks are strictly sequential (each step depends on the previous result)
  • Multiple agents would need to edit the same file
  • The task is simple enough for a single Agent to handle efficiently
  • Budget is tight and token cost is a primary concern

Task Decomposition Principles

  • Right-size the tasks: Too small and coordination overhead exceeds the benefit; too large and Teammates drift too long without syncing
  • Isolate file ownership: Each Teammate should own a distinct set of files to avoid write conflicts
  • Define clear deliverables: Every task should produce a verifiable output — a function, a test file, a report
  • Aim for 5-6 tasks per Teammate to keep them busy while giving the Lead manageable oversight

Token Cost Considerations

Agent Teams consumes roughly 3-4x the tokens of a single session. Each Teammate maintains an independent context window with separate token usage.

Cost optimization strategies:

  • Evaluate task complexity in a single session first; only spin up Agent Teams when parallelism is clearly worthwhile
  • Assign cheaper models (like Sonnet) to simpler subtasks
  • Shut down Teammates promptly once their work is done to avoid idle consumption
  • Start with 2-3 Teammates and scale up as you gain experience

Comparison with Other Parallel Approaches

Claude Code offers three ways to work in parallel, each suited to different scenarios. For a deep dive on Worktrees, see the Claude Code Worktree Guide.

DimensionAgent TeamsSubagentWorktree
CommunicationDirect inter-Teammate messagingReports to parent Agent onlyNo automatic communication
CoordinationShared task list, self-coordinatingParent Agent manages allFully manual
Concurrency safetyFile locks prevent conflictsSafe within a single sessionGit branch isolation
Token costHigh (3-4x)MediumLow (independent sessions)
Best forComplex tasks needing discussionFocused, independent subtasksLong-running parallel features
Learning curveModerateLowLow

Decision guide:

  • Subtasks are independent and you just need the results → Subagent
  • Work requires cross-role communication and coordination → Agent Teams
  • Independent feature branches with long-running parallel development → Worktree

For more on recent Claude Code capabilities, check out the Claude Code February Updates.

Command Reference

ActionCommand / Key
Enable Agent TeamsCLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS=1
Switch Teammate (in-process)Shift+Down
View task listCtrl+T
Enter Teammate sessionEnter (after selecting a Teammate)
Exit Teammate sessionEscape
Force in-process modeclaude --teammate-mode in-process
Dismiss a TeammateTell the Lead: “Close the researcher Teammate”
Clean up team resourcesTell the Lead: “Clean up the team”
List tmux sessionstmux ls
Kill orphaned tmux sessionstmux kill-session -t <session-name>

FAQ

Does Agent Teams support split panes in VS Code’s terminal?

No. Split panes mode requires tmux or iTerm2. VS Code’s integrated terminal, Windows Terminal, and Ghostty do not support split panes. However, in-process mode works in any terminal with identical functionality — all Teammates simply share a single terminal window.

Can a Teammate create its own team?

No. Agent Teams does not support nesting. Only the Team Lead can manage the team. Teammates cannot spawn their own Teammates or create sub-teams. Similarly, a single Lead can only manage one team at a time.

What if Teammates don’t appear after creating a team?

A few things to check:

  1. In in-process mode, Teammates may already be running but not visible — press Shift+Down to cycle through them
  2. Confirm the task is complex enough — Claude may decide a team is unnecessary for simple requests
  3. For split panes, verify tmux is installed: which tmux
  4. iTerm2 users should confirm the it2 CLI is installed and the Python API is enabled

Is the 3-4x token cost worth it?

It depends on the scenario. For code review, multi-hypothesis debugging, and cross-layer feature development — work that is inherently parallel — Agent Teams can compress 1-2 hours of serial work into 15-20 minutes. The time savings far outweigh the extra token cost. For straightforward sequential tasks, a single session with Subagents is the more economical choice. If you are interested in other advanced Claude Code capabilities, see the Superpowers Deep Dive.

Conclusion

Agent Teams marks a significant step for Claude Code, moving from single-agent operation to genuine team collaboration. Its core value goes beyond parallel speedup — the real gain is the quality improvement from multi-perspective collaboration. Multiple Agents reviewing, challenging, and supplementing each other’s work are far more effective at catching blind spots than a single Agent iterating alone.

Agent Teams is still experimental, with known limitations around session recovery and task state synchronization. But for high-value scenarios like cross-layer development, multi-hypothesis debugging, and parallel code review, the productivity gains are already substantial. Start with simple review and research tasks, build experience, and then expand to more complex development workflows.

Comments

Join the discussion — requires a GitHub account