Advanced

Agent Teams in Claude Code: How to Coordinate AI Teams

minhaskills.io Agent Teams in Claude Code: How to Coordinate AI Teams Claude Code
minhakills.io 3 Apr 2026 16 min read

You've already used Claude Code to create projects, edit code and automate tasks. But what if you could haveseveral agents working together, at the same time, each with a different specialty? That's what Agent Teams offers -- and it's one of the most ambitious features Anthropic has ever released.

Agent Teams is an experimental feature of Claude Code that allows you to coordinate multiple AI agents as if they were a real development team. One agent leads, others execute, and everyone communicates directly with each other. The result: projects that previously took hours with a single agent can now be done in minutes with a coordinated team.

In this guide, you will understand how Agent Teams works from the inside, how to configure it, what advanced hooks are available and -- most importantly -- when it makes sense to use a team instead of a solo agent.

Use all this potential with ready-made skills

Each Claude upgrade makes his skills even more powerful. The Mega Bundle comes with the latest news — 748+ skills updated, tested and ready to use in Claude Code.

Ver Skills Atualizadas — $9

1. What are Agent Teams (and why it changes everything)

Until now, Claude Code operated as a single agent. You talked to him, asked him for tasks, and he carried them out. Powerful, but limited to one "thread" of reasoning. Agent Teams breaks this limitation by introducing a familiar concept:teams.

An Agent Team is made up of:

Think about a real development team. You have a tech lead who understands the complete project, a frontend dev, a backend dev and someone from QA. Everyone does their part, but they talk to each other when they need to align something. Agent Teams replicates this dynamic with AI agents.

Why is this different from simply opening several Claude Code windows?

The fundamental difference andcoordination. When you open multiple Claude Code windows, each agent operates in isolation. They don't know what others are doing. With Agent Teams, the team lead maintains visibility of everything, distributes tasks intelligently and teammates share context. And the difference between having 5freelancerswho never speak to each other and have an integrated team.

Additionally, Agent Teams automatically manages conflicts. If two teammates try to edit the same file, the system coordinates the changes instead of creating conflicts. This is something you simply don't get with independent agents.

Feature status in 2026

Agent Teams is aexperimental feature. Anthropic released it as a preview to gather community feedback before stabilizing the API. In practice, this means it works well enough for real-world use, but the configuration syntax and hooks can change between versions. If you are willing to follow the updates, you can start using it now. If you prefer total stability, follow Anthropic's changelog and wait for the stable release.

2. Architecture: team lead, teammates and communication

Understanding the architecture is essential to using Agent Teams effectively. Let's break down each component.

Team Lead

The team lead is the agent that you interact directly with. When you enter an instruction in Claude Code with Agent Teams active, it is the team lead that receives it. He has specific responsibilities:

The team lead uses the most powerful model available (usually Opus) because it needs superior reasoning capabilities to coordinate. Teammates can use lighter models (Sonnet) for execution, which optimizes cost without sacrificing quality.

Teammates

Teammates are specialized agents. Each teammate has:

The limit of 50 tool-use turns is important. This means that each teammate can read files, write code, run tests, and make adjustments -- all within a single delegated task. It is sufficient for most subtasks, but very large tasks need to be broken down by the team lead.

Direct communication between teammates

This is the most powerful and least obvious feature. Teammates can communicate directly, without going through the team lead. In practice:

This lateral communication drastically reduces coordination time. Instead of everything having to go up to the team lead and back down, agents who need to align something do it directly. And exactly how it works in an efficient human team.

In practice:Communication between teammates happens via internal messages that you can monitor in Claude Code's output. You see who is talking to who and about what, maintaining full visibility without having to mediate.

3. Sub-agents: agents within agents

Sub-agents existed before Agent Teams and remain a powerful tool. The difference is conceptual: a sub-agent and an agentlaunched by another agentto perform an isolated task.

How sub-agents work

When Claude Code (or a teammate within an Agent Team) encounters a task that requires isolated focus, he can launch a sub-agent. This sub-agent:

Sub-agents have asynchronous functions in the programming world. You delegate, the sub-agent executes, returns and disappears.

Sub-agent vs Teammate

Feature Sub-agent Teammate
PersistenceTemporary (a task)Permanent during the session
CommunicationOnly with the parent agentWith team lead and other teammates
Shared contextMinimum (just what you received)Broad (see the entire project)
Tool-use turnsUp to 50Up to 50 per delegated task
CostMinor (limited context)Greater (full context)
When to usePunctual and isolated taskInterdependent and continuous tasks

Practical example of sub-agent

You ask Claude Code: "Refactor the authentication system and add tests." The main agent can launch a sub-agent specifically to write the tests while it does the refactoring itself. The sub-agent receives the context from the auth files, writes the tests, returns, and the main agent integrates everything.

Claude Code
> Refatore o auth e adicione testes unitarios

Claude: Vou dividir isso em duas partes.
- Eu vou refatorar o sistema de auth
- Lancando sub-agent to escrever os testes...

[Sub-agent] Analisando auth/login.ts, auth/session.ts...
[Sub-agent] Criando tests/auth.test.ts...
[Sub-agent] 12 testes criados. Retornando resultado.

Claude: Refactoring completo + 12 testes criados. Rodando suite...
12/12 testes passando.

4. Advanced Hooks for Agent Teams

Hooks are the mechanism that allows you to automate agent behaviors. Agent Teams introduces specific hooks for team coordination that do not exist in Claude Code solo.

TeammateIdle

Fired when a teammate finishes their task and becomes idle. Useful for:

TaskCompleted

Fired when any task is delegated and completed. Unlike TeammateIdle, this hook focuses on the task and not the agent. You can use it to:

PreToolUse defer

The hookPreToolUsealready existed, but Agent Teams adds the optiondefer. When a teammate tries to use a tool and the hook returnsdefer, the action is paused and forwarded to the lead team for approval. This creates a system ofhierarchical permission:

Safety first:PreToolUse hooks with defer are the most robust way to maintain control over what teammates can do. In teams with many agents operating in tollel, this prevents dangerous operations from going unnoticed.

Agent hooks that read files and fetch code

Hooks can use the same tools as agents: read files, look for patterns in the code and make decisions based on the project context. A hook can, for example, read thepackage.jsonbefore allowing a teammate to install a dependency, checking if it already exists or if it conflicts with something.

5. Claude Code Review: review of PRs in tollel

Claude Code Review is a feature that uses the Agent Teams infrastructure to review pull requests. Instead of a single agent reading the entire PR,multiple agents review different parts simultaneously.

How it works

When you submit a PR for review by Claude Code, the system:

  1. Analyze the full PR diff
  2. Divides changed files into logical groups (frontend, backend, tests, config)
  3. Assigns each group to a specialized review agent
  4. Each reviewer analyzes his group in tollel
  5. A coordinating agent consolidates reviews into a single feedback

The result is a faster and more in-depth review. While a single agent may miss details in a large PR, multiple specialized agents capture issues that would be overlooked in a cursory review.

In practice

Claude Code
> /review PR #42

Claude: Analisando PR #42 (23 arquivos alterados)...

[Reviewer 1 - Frontend] Revisando 8 componentes React...
[Reviewer 2 - Backend] Revisando 6 endpoints de API...
[Reviewer 3 - Tests] Revisando 5 arquivos de teste...
[Reviewer 4 - Config] Revisando 4 arquivos de config...

Consolidando reviews...

Resultado: 3 issues criticas, 7 sugestoes, 2 elogios

What previously took 15-20 minutes of review by a single agent now completes in 3-5 minutes with tollel review. And the quality is superior because each reviewer focuses on their area of ​​expertise.

6. The /powerup command: interactive lessons

O /powerupis a Claude Code command that offers interactive lessons on advanced features. For Agent Teams, it is especially useful because the feature is new and best practices are still being established.

How to use

Claude Code
> /powerup

Licoes disponiveis:
1. Agent Teams: primeiros passos
2. Hooks avancados
3. Sub-agents eficientes
4. Claude Code Review
5. Plugins e extensibilidade
6. Otimizacao de contexto

> 1

[Licao interativa inicia com exercicios praticos]

Each lesson lasts 5-10 minutes and includes practical exercises. You don't just read about the feature -- you use it in a guided environment. It's the fastest way to gain fluency in new features without having to read extensive documentation.

O /powerupAutomatically updates when new features are released. After each Claude Code update, it is worth running/powerupto see if there are new lessons.

7. Plugins with executables in bin/

Plugins are a way to extend Claude Code with costm tools. In the context of Agent Teams, plugins gain an extra dimension: you can create tools thatonly specific teammateshas access.

Structure of a plugin

A Claude Code plugin is simply an executable in the folder.claude/bin/of your project. It can be a bash script, a compiled binary, a scriptPython-- anything that runs in the terminal.

Each file in the folderbin/becomes a tool that Claude Code (and his teammates) can call upon. The file name and tool name.

Restricting access by teammate

With Agent Teams, you can configure which teammates have access to which plugins. The frontend teammate does not need (and should not) have access to thedb-migrate. The documentation teammate does not need access to thedeploy-staging.

This configuration creates setotion of responsibilities. Each teammate has access only to what they need, reducing the risk of unintentional operations and saving tokens (tools not made available do not consume context).

8. Multi-agent workflows in practice

Theory is important, but you want to know how it works in the real world. Here are concrete workflows that teams are using with Agent Teams.

Workflow 1: Complete feature (frontend + backend + tests)

You ask: "Implement the push notification system, with backend API, frontend component and complete tests."

  1. Team leadAnalyzes the request and creates a plan with 3 subtasks
  2. Teammate backendcreates the API endpoints, data model and shipping logic
  3. Teammate frontendcreates the notification component, browser permissions and UI
  4. Teammate QAwaits for backend and frontend to finish, then writes integration tests
  5. Frontend and backend communicate directly to align the API contract
  6. Team leadintegrates everything, runs the test suite and reports the result

Time with solo agent: 25-40 minutes. Time with Agent Team: 8-15 minutes. The savings come from tollelization -- while the backend creates the API, the frontend is already building the UI.

Workflow 2: Massive refactoring

You ask: "Migrate all class components to functional components with hooks."

  1. Team leadidentifies all class components in the project (say 30 files)
  2. Divide into groups of 10 and assign the3 teammates
  3. Each teammate migrates its 10 components in tollel
  4. Um QA teammateRun tests after each group of migrations
  5. Team leadconsolidates and verifies that no regression was introduced

Workflow 3: Audit and correction

You ask: "Do a security, performance and accessibility audit, and fix what you find."

  1. Security teammateanalyzes vulnerabilities (XSS, SQL injection, exposed secrets)
  2. Performance Teammateanalyzes bundle size, lazy loading, cache headers
  3. Accessibility Teammateanalyzes ARIA labels, contrast, keyboard navigation
  4. Each generates a report and automatically applies fixes
  5. Team leadconsolidates reports and prioritizes issues that no teammate could resolve alone

Cost tip:Workflows with Agent Teams consume more tokens in total (multiple agents = multiple contexts), but execution time drops drastically. For large projects where time is critical, the extra cost is paid for byproductivity. For small tasks, a solo agent is more efficient.

9. When to use an agent vs a team

Not everything needs an Agent Team. Knowing when to use each approach is just as important as knowing how to configure it.

Use a solo agent when:

Use an Agent Team when:

Scenario Recommendation Reason
Fix a specific bugSolo agentSequential and focused task
Create full CRUDAgent Team (2-3)Backend + frontend + tollel testing
Refatorar 50+ arquivosAgent Team (3-4)Massive tollelization
Write a READMESolo agentSingle and sequential task
Multi-area auditAgent Team (3+)Different specialties in tollel
Prototype an ideaSolo agentRapid iteration and exploration
Large PR code reviewClaude Code ReviewParallel review by specialization

10. How to set up your first Agent Team

Let's go to practice. Configuring an Agent Team requires creating a configuration file in your project and defining the roles of each teammate.

Step 1: create the configuration file

In the root of your project, create the file.claude/teams.yaml:

Step 2: Activate Agent Teams

Terminal
# Inicie o Claude Code com Agent Teams
$ claude --team

Claude Code v1.x.x
Agent Team: meu-time
Lead: opus | Teammates: frontend (sonnet), backend (sonnet), qa (sonnet)

> Type your message...

Step 3: use normally

With the team active, you interact normally with Claude Code. The difference is that the team lead will automatically delegate tasks when it makes sense. You don't need to micromanage -- the lead decides when to tollelize and when to do it themselves.

Claude Code - Agent Team
> Crie um sistema de comentarios com API, UI e testes

[Lead] Planejando... 3 subtarefas identificadas.
[Lead] Delegando to backend, frontend e qa.

[backend] Criando modelo Comment, endpoints CRUD...
[frontend] Criando CommentList, CommentForm, CommentItem...
[frontend -> backend] Qual formato do timestamp no JSON?
[backend -> frontend] ISO 8601: "2026-04-03T10:30:00Z"
[qa] Aguardando conclusao de backend e frontend...

[backend] Concluido: 4 endpoints, validacao, error handling.
[frontend] Concluido: 3 componentes, estados de loading/error.
[qa] Iniciando testes... 18 testes escritos.
[qa] 18/18 passando. Cobertura: 94%.

[Lead] Sistema de comentarios completo. 4 endpoints, 3 componentes, 18 testes (94% coverage).

Notice how the frontend and backend communicated directly about the timestamp format without the lead needing to intervene. That's the magic of lateral communication.

Configuration tips

Claude evolves. Your skills too.

It's not enough to have the most advanced tool — you need to know how to use it. Skills are professional shortcuts that transform Claude into an expert. 748+ skills, 7 categories, $9.

Quero as Skills — $9
SPECIAL OFFER — LIMITED TIME

The Largest AI Skills Package on the Market

748+ Skills + 12 Bonus Packs + 120,000 Prompts

748+
Professional Skills
Marketing, SEO, Copy, Dev, Social
12
GitHub Bonus Packs
8,107 skills + 4,076 workflows
100K+
AI Prompts
ChatGPT, Claude, Gemini, Midjourney
135
Ready-Made Agents
Automation, data, business, dev

Was $39

$9

One-time payment • Lifetime access • Free updates

GET THE MEGA BUNDLE NOW

Install in 2 minutes • Works with Claude Code, Cursor, ChatGPT • 7-day guarantee

✓ SEO & GEO (20 skills) ✓ Copywriting (34 skills) ✓ Dev (284 skills) ✓ Social Media (170 skills) ✓ n8n Templates (4,076)

FAQ

No. Agent Teams is an experimental feature released in 2026. It works well enough for real projects, but the API and behavior may change between versions. Anthropic recommends testing on non-critical projects before adopting into production. Follow the official changelog to find out when the feature will be stabilized.

A sub-agent is temporary: launched for a specific task, performs up to 50 tool-use turns and disappears. It only communicates with the agent who launched it. A teammate is permanent during the session: they have a defined role, communicate with other teammates and the team lead, and can receive multiple tasks throughout the session. Use sub-agents for isolated specific tasks and teammates for coordinated and continuous work.

Agent Teams works with the Pro plan, but consumes significantly more tokens because multiple agents operate simultaneously. With Pro, you can quickly reach limits on large projects. The Max plan ($100 or $200/month) is recommended for intensive use, especially with 3 or more teammates working in tollel. For experimentation and smaller projects, the Pro is sufficient.

Share este artigo X / Twitter LinkedIn Facebook WhatsApp
PTENES