The Agentic AI Builder's Playbook

Claude Code Agent Teams: Production Patterns for Multi-Agent Collaboration

By Jason Newell · ~6 min read · Claude Code

Agent Teams are Claude Code's most powerful — and most misunderstood — feature. Most engineers hear "multi-agent" and think parallel execution. Agent Teams are more interesting than that. The killer feature isn't parallelism. It's collaboration.

Here's everything you need to know to use them in production.

What Makes Agent Teams Different from Subagents

The distinction matters:

Subagents: Parent assigns task → subagent executes → result returns to parent only. Subagents are contractors on separate errands. They don't know what other subagents are doing.

Agent Teams: Lead assigns task → teammates can communicate directly with each other → peer-to-peer messaging, shared task list. Teams are a project team in the same room.

The structural difference: teammates talk to each other directly. Subagents talk only to their parent.

Each teammate is a full Claude Code instance with:

  • Its own context window (doesn't inherit the lead's context)
  • Its own CLAUDE.md load
  • Direct peer-to-peer messaging with other teammates
  • Shared task list on disk

Production Team Patterns

Pattern 1: Full-Stack Team

Lead/Architect → Frontend → Backend → Testing → Reviewer

Sequential handoff chain. Lead plans the architecture, Frontend builds the UI, Backend builds the API, Testing writes and runs tests, Reviewer merges. Each specialist has focused context; no one carries the full codebase in their window.

Pattern 2: Debug Debate Team

Three teammates generate independent hypotheses about a bug. They challenge and disprove each other's hypotheses. The surviving hypothesis is the fix.

This beats sequential debugging by avoiding anchoring bias — the first plausible-sounding hypothesis doesn't win by default.

Pattern 3: QA Team

Security Agent + Performance Agent + UX Agent. Model routing by role: Opus for security analysis, Sonnet for performance profiling, Haiku for UX feedback. Different cognitive tasks get different model tiers.

Pattern 4: Writing Team

Context Gatherer ↔ Writer ↔ Editor. The gatherer assembles research; the writer drafts; the editor revises. Parallel and iterative — the editor can send the draft back to the writer without the lead's involvement.

Best Practices

  • Always plan before spawning teammates. Token cost scales linearly with team size. A team of 3 costs 3x the tokens. A team of 8 costs 8x. Plan first; spawn only the teammates the plan requires.
  • CLAUDE.md is a force multiplier. Three agents reading a clear CLAUDE.md outperform three agents exploring blindly. The quality of shared context determines the quality of team output.
  • Set a quality bar explicitly. Instructions trickle down from lead to teammates. If the lead's quality bar is vague, each teammate will interpret it differently. Be specific about what "done" looks like.
  • Define roles prescriptively for expensive tasks. The more tokens at stake, the more precisely you should define what each teammate is responsible for and what they are not.
  • Monitor context. A single agent fills 80–90% of its context window on a 50K+ codebase. Split to ~40% each when context is getting full.

Anti-Patterns

  • Over-spawning: 3 agents, not 8. More agents = more coordination overhead, more token cost, more chances for merge conflicts.
  • Same-file edits: Two teammates editing the same file creates merge conflicts that require human resolution. Assign file ownership clearly.
  • Splitting by role instead of by context: "Frontend agent" and "Backend agent" both need to understand the API contract. "Auth module agent" and "Dashboard agent" have genuinely separate concerns. Split by context boundary, not by job title.
  • Skipping the plan: Spawning teammates without a plan wastes tokens on coordination. Plan first; the plan is the contract between teammates.

The Production Formula

CLAUDE.md (shared context) + quality bar (explicit) + prescriptive roles = production Agent Team

Start simple. Add agents only when parallel exploration adds measurable value. The goal isn't to maximize the number of agents. It's to maximize the output quality per token.

Jason Newell · Applies to Claude Code v2.1.32+, Opus 4.6, experimental flag required (AGENT_TEAMS=1).

Agentic AISER-AGT-021

Related

Related field notes

Keep reading

More field notes

This piece is part of the MAX Research Collective library. Browse the rest, or connect on LinkedIn.