Claude Code agent teams explained
Lessons from building with the new agent teams feature in Claude Code
Hey đ,
Claude Code just shipped a really interesting feature called Agent Teams. Instead of one agent doing everything, you can now run multiple Claude Code instances that work together as a team. Each agent has its own context window, and they can talk to each other directly (which is crazy).
Using AI agents to write code is standard now. Using one agent in a terminal or IDE feels natural - describe a task, it builds, you review. Straightforward loop.
Multiple agents talking to each other feels completely different. And, despite this being an early feature, it feels like looking into the future.
I made a video showing how to set this up with tmux so you can watch all the agents working together.
Subagents vs Agent Teams
Youâre probably familiar with subagents in Claude Code. With subagents, each one has its own context window and results return to the parent. Communication is one direction. The parent manages everything.
With agent teams, each agent also has its own context window but theyâre fully independent Claude Code sessions. They can message each other directly. Thereâs a shared task list for coordination. Itâs best for long running work that needs discussion and iteration between agents.
The quick test is: if your agents would benefit from talking to each other, use a team. If they just need to return results, subagents are simpler and cheaper.
When To Use This
The pattern I keep coming back to is agents reviewing other agentsâ work.
One agent writes code. A second agent reads the output and sends specific feedback. The first agent fixes the issue. The reviewer checks again.
With subagents, this feedback loop runs through you. The reviewer reports back, you read it, you paste it into a new prompt for the builder. Youâre the middleman.
With agent teams, the reviewer sends notes directly to the builder. The builder fixes it. The reviewer checks again. Multiple rounds without you relaying anything.
Thatâs a small thing on paper. In practice, it changes what kind of work you can hand to agents. Single-pass generation - write this function, generate these tests - works fine with one agent. Multi-pass long running work - build something, review it, revise, review again â requires agents that can talk to each other.
C Compiler
To see where this goes, look at what Anthropicâs engineering team did. Nicholas Carlini ran sixteen Claude instances to build a C compiler from scratch in Rust. Two weeks, about two thousand sessions, just under twenty thousand dollars in tokens. The result: a hundred thousand lines of Rust that compiles the Linux kernel. Ninety-nine percent GCC torture test pass rate.
The interesting part isnât the scale. Itâs the change in the type of work agents can do.
Carliniâs key observation: âClaude will work autonomously to solve whatever problem I give it. So itâs important that the task verifier is nearly perfect.â The agents werenât the bottleneck. The quality of the feedback loop was.
Thatâs the same pattern at a different scale. Builder agents produce code. Reviewer agents check it and send feedback. The builders act on it. The loop runs without a human relaying messages.
My Experience
I used agent teams to build an app with three Claude instances: a backend agent, a frontend agent, and a code reviewer. The reviewer watches both, checks that the API contract lines up, and sends issues to the agent that owns the code.
During the build, the reviewer caught bugs in the initial implementation and delegated back to the front end and back end agents to fix the issues.
Thatâs a closed-loop correction that happened without me. With a single agent, Iâd have caught it during code review. With teams, the feedback loop ran on its own.
Tradeoffs
Three agents in parallel costs roughly three times as much. I burned through my rate limits making a video about this (and rarely have issues). Thatâs the honest trade-off.
The C compiler project used about twenty thousand dollars in tokens over two weeks. Thatâs sixteen agents running in loops. For most of us, the question isnât âcan I afford sixteen agentsâ â itâs âis the closed-loop feedback worth 3x the cost for this particular task?â
Where Is This Heading?
Right now, agent teams are experimental.
But the pattern - agents reviewing agents in a loop, self-correcting, picking up the next task when theyâre done - thatâs clearly the direction weâre going in. Systems of specialised agents working together on more complex tasks. The C compiler project showed it actually works at scale. Agent teams in Claude Code bring a version of it to your terminal.
I walked through the full build in my latest video here.



