“You hand the foreman the blueprint, not a list of cuts. They read the whole building, decide who does what, and put the crew to work.”
Enable Agent Teams
Agent Teams is experimental and disabled by default. Turn it on with an environment variable, and put it in your shell profile so it's always there.
# Add to ~/.zshrc (macOS) or ~/.bashrc (Linux)
export CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS=1Prompt the lead, not the steps
The shift from ordinary prompting: describe the whole project and let the lead agent decompose it. The lead breaks the work down, assigns roles, and spawns teammates, each in its own context window. You see which agents are active and what each is doing.
I need to build a user authentication system. Spawn separate agents to handle:
1. Backend: Express.js routes for login, signup, and token refresh
2. Frontend: React login and signup forms with validation
3. Testing: integration tests for all auth endpoints
4. Review: review the other agents' code for security issuesNotice the shape: one role per agent, a concrete deliverable each, and an explicit reviewer. The lead handles the orchestration; you handle the brief.
A reusable template
I need to [describe the full feature].
Spawn separate agents:
1. [Role 1]: [specific task, with files/modules]
2. [Role 2]: [specific task, with files/modules]
3. [Role 3]: [specific task, with files/modules]
4. Review: review all code for [bugs / security / style]
Each agent works in its own context. Coordinate through the shared
task list. Flag dependencies before starting dependent tasks.In one line each
- Enable the experimental mode with CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS=1 in your shell profile.
- Prompt the lead with the whole feature and let it decompose, assign roles, and spawn teammates.
- Give each agent one role and a concrete deliverable, and always include an explicit reviewer.
Where to go next