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.

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.

SPECIAL OFFER

Master Claude Code with 748+ Professional Skills

Every skill in this article becomes 10x more powerful with ready-made templates. Install in 2 minutes and start producing like a senior.

748+ Skills + 12 Bonus + 120K Prompts

De $197

$9

One-time payment • Lifetime access • 7-day guarantee

GET THE MEGA BUNDLE NOW

Install in 2 min • Claude Code, Cursor, ChatGPT

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
SPECIAL OFFER

Master Claude Code with 748+ Professional Skills

Every skill in this article becomes 10x more powerful with ready-made templates. Install in 2 minutes and start producing like a senior.

748+ Skills + 12 Bonus + 120K Prompts

De $197

$9

One-time payment • Lifetime access • 7-day guarantee

GET THE MEGA BUNDLE NOW

Install in 2 min • Claude Code, Cursor, ChatGPT

class="related-posts" style="max-width:800px;margin:2rem auto;padding:1.5rem 2rem;background:#fff;border-radius:12px;border:1px solid #e2e8f0;">

Read also