How to Use Claude Code's New Agent Teams to Automate Parallel Workflows (With Cost Awareness)
Anthropic's new 'agent teams' feature lets you spin up multiple AI agents that collaborate and review each other's work. Learn how to set it up, structure a team, and understand the significant token cost trade-off for complex automation.
Practical Summary
This guide walks you through enabling and using the experimental 'agent teams' feature in Claude Code. It shows how to set up a team of peer agents for parallel task execution, provides a sample prompt structure, and clarifies when the increased token cost is justified for business automation.
Why It Matters
For businesses looking to automate complex, multi-part workflows, this feature offers a structured way to parallelize work and build in peer review. However, understanding the 3-4x token cost multiplier is critical for budgeting and cost optimization. This allows teams to make informed decisions about applying AI agent collaboration where the efficiency gains outweigh the higher operational cost.
Step 1: Enable the Experimental Feature
Ensure you are using Claude Code version 2.1.32 or later. To activate agent teams, you need to add an environment variable to your Claude Code settings. Add the following key-value pair to your settings.json file: "env": { "CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS": "1" }. Alternatively, you can paste this configuration directly into a Claude prompt and ask it to add it to your settings. After making this change, restart Claude Code.
Step 2: Structure Your Team and Prompt
Start with a clear goal for the entire team, as agents begin with zero context. In your prompt, specify that you want to "create a team of 3 using Sonnet," then define each agent's role (e.g., QA Agent, Front-end Developer, Back-end Developer), its specific deliverable, and which other agent it should message when its part is complete. Keep the team small, between 3-5 agents, for manageability.
Step 3: Define Ownership and Communication Rules
Establish clear boundaries for the workflow. Assign each agent to own its own set of files. Define the exact outputs or artifacts each agent is responsible for creating. Crucially, explicitly name the communication pathways: for example, instruct the QA agent to "message the front-end and back-end developers upon finding a bug." This structured communication is what enables the peer review loop.