No history yet

Enable Agent Teams

Unlocking Agent Teams

By default, the Claude Code CLI operates with a single agent. To access its multi-agent capabilities, you need to enable an experimental feature flag. This unlocks the ability to create and manage teams of agents that can collaborate on complex tasks.

You can enable this feature in two ways. The first is by setting an environment variable in your terminal. This method is temporary and only lasts for your current shell session.

# Enable Agent Teams for the current session
export CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS=1

For a more permanent solution, you can modify the global settings file. This ensures that agent teams are enabled every time you run the Claude Code CLI. You'll need to create or edit the settings.json file in your Claude Code configuration directory.

{
  "CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS": "1"
}

Place the code above into ~/.claude/settings.json. If the file or directory doesn't exist, create it first.

Finally, ensure your CLI is up to date. Multi-agent features are under active development, and running the latest version of Claude Code is the best way to ensure compatibility and access to all capabilities.

Lead vs. Teammate

Once enabled, the agent team structure introduces a new dynamic: the distinction between a Lead Agent and Teammate Agents. This isn't just a naming convention; it's a functional hierarchy that enables sophisticated workflows.

The Lead Agent acts as the orchestrator. You give it the primary objective, and it formulates a plan. It then spins up and delegates specific sub-tasks to one or more Teammate Agents. Each Teammate is a specialist, focusing on a single piece of the puzzle, like writing tests, refactoring code, or updating documentation. This division of labor allows for parallel processing and more focused AI collaboration.

Setting Up Your Viewport

Managing a team of agents requires being able to see what they're all doing. Claude Code leverages terminal multiplexers to provide this observability. A multiplexer allows you to split your terminal window into multiple panes, with each pane showing the real-time activity of a different agent.

Before proceeding, you should have a terminal multiplexers like tmux or iTerm2 installed on your system. These tools are necessary to use the split-pane modes that let you monitor the Lead Agent and its Teammates simultaneously. Without one, you won't be able to effectively observe and debug your agent team's workflow.

Quiz Questions 1/5

What is the primary role of a Lead Agent in the Claude Code CLI's multi-agent system?

Quiz Questions 2/5

How can you permanently enable the experimental multi-agent feature in the Claude Code CLI?

With the feature flag enabled and a multiplexer ready, you're prepared to start orchestrating your own AI development team.