Learning Objectives
By the end of this chapter, you will:
- Understand what Claude Code is
- Learn what Agent Teams are and why they matter
- Know when to use Agent Teams vs single sessions
- Understand the difference between Agent Teams and Subagents
What is Claude Code?
Claude Code is a command-line interface (CLI) tool powered by Claude AI that helps developers with software engineering tasks. Think of it as having an AI assistant right in your terminal!

What Are Agent Teams?
Agent Teams let you run multiple Claude Code instances working together on the same project. Imagine having a team of AI assistants, each with their own specialty!
Simple Analogy: A Restaurant Kitchen
Think of Agent Teams like a restaurant kitchen:

Why Use Agent Teams?
The Problem with Single Sessions
When you have a complex task, a single Claude session must do everything one step at a time:

The Agent Teams Solution
With Agent Teams, multiple agents work simultaneously:
Agent Teams vs Subagents: What’s the Difference?
This is a common point of confusion. Let’s clarify:
Subagents Vs Agent Teams

Comparison Table
| Feature | Subagents | Agent Teams |
|---|---|---|
| Context | Shared with main agent | Each has own context |
| Communication | Report to main only | Talk to each other |
| You can talk to | Main agent only | Any teammate |
| Best for | Simple, focused tasks | Complex collaboration |
| Token cost | Lower | Higher |
| Setup | Simpler | More setup needed |
When Should You Use Agent Teams?
GREAT Use Cases for Agent Teams
- Research and Review
– Multiple teammates investigate different aspects simultaneously
– They can challenge each other’s findings
- Building New Features
– Each teammate owns a different module
– Frontend, Backend, Tests – all at once!
- Debugging Complex Issues
– Different teammates test different theories
– They debate and find the truth faster
- Cross-Layer Changes
– Frontend teammate, Backend teammate, Database teammate
– Each owns their layer
When NOT to Use Agent Teams
- Simple, sequential tasks – Use single session
- Same-file edits – Causes conflicts
- Tasks with many dependencies – Use subagents
- Quick fixes – Overkill for simple tasks
The Components of an Agent Team
Here’s the complete architecture:

Component Breakdown
| Component | What It Does |
|---|---|
| Team Lead | The boss! Creates team, assigns tasks, coordinates work |
| Teammates | Workers! Each is a full Claude Code instance |
| Task List | Shared to-do list everyone can see and update |
| Mailbox | How agents send messages to each other |
Real-World Example: Building a Web App
Let’s see how Agent Teams would help build a simple e-commerce website:

Key Terminology
| Term | Definition |
|---|---|
| Agent | A Claude Code instance that can work on tasks |
| Team Lead | The main session that creates and coordinates the team |
| Teammate | A separate Claude Code instance spawned by the lead |
| Spawn | To create a new teammate |
| Task | A unit of work assigned to a teammate |
| Mailbox | The messaging system for agent communication |
| Context Window | The “memory” an agent has for conversation |
| Token | The unit of text Claude processes (roughly 4 chars) |
Chapter Summary
In this chapter, you learned:
- Claude Code is an AI assistant in your terminal
- Agent Teams let multiple Claude instances work together
- Team Lead coordinates, Teammates do the work
- Agent Teams ≠ Subagents – Teams can communicate with each other
- Use Agent Teams for parallel, independent work
- Avoid Agent Teams for simple or sequential tasks
Knowledge Check Quiz
Answer these questions to test your understanding:
- What is the main difference between Agent Teams and Subagents?
- Name three good use cases for Agent Teams.
- Who coordinates the work in an Agent Team?
- Can teammates talk to each other?
- Why would Agent Teams be faster than a single session for some tasks?
Click to see answers
- Agent Teams allow teammates to communicate with each other, while Subagents can only report back to the main agent.
2. Good use cases: Research/Review, Building new features, Debugging complex issues, Cross-layer changes.
3. The Team Lead coordinates all work.
4. Yes! Teammates can message each other directly.
5. Agent Teams work in parallel (simultaneously), so multiple tasks complete at the same time instead of one after another.
Exercise 1.1: Identify the Right Tool
For each scenario below, decide: Single Session, Subagents, or Agent Teams?
| Scenario | Your Answer |
|---|---|
| Fix a typo in a README file | |
| Review a PR for security, performance, and tests | |
| Research 5 different API options and compare | |
| Add a console.log for debugging | |
| Build a feature with frontend, backend, and tests | |
| Sequential database migration |
Click to see answers
| Scenario | Answer | Why | |———-|——–|—–| | Fix a typo in a README file | Single Session | Simple, quick task | | Review a PR for security, performance, and tests | Agent Teams | Parallel review with different focuses | | Research 5 different API options and compare | Agent Teams | Each can research independently | | Add a console.log for debugging | Single Session | Very simple task | | Build a feature with frontend, backend, and tests | Agent Teams | Each layer can work in parallel | | Sequential database migration | Single Session or Subagents | Must be done in order |Next Chapter
In Chapter 2: Setting Up Your Environment, you’ll learn how to install and configure Claude Code for Agent Teams.

