Claude Code agent teams: run parallel agents cleanly
How to run Claude Code agent teams and parallel sessions without overlapping edits, lost context or a wall of terminals: worktrees, reviewers, approvals, phone.

On this page
Part of How Fluf runs Claude Code with your own login (2026 rules)
Claude Code agent teams let one Claude Code session act as the lead and spawn teammates, each a full Claude Code instance with its own context window, that share a task list and message each other directly. Turn them on with CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS=1. They are experimental, off by default, and they make the old problems of parallel agents worse if you skip the setup: two agents editing one file, permission prompts piling up, and nobody remembering why a decision was made.
This guide is about running Claude Code agents in parallel cleanly, with or without the teams feature: isolated worktrees, a reviewer on a different model, one place to approve commands, and a way to check in from your phone. For the wider map of subagents, teams and headless runs, read our Claude Code agents overview first.
Figures from Anthropic's agent teams docs, checked 28 November 2026.
1. Why running 5 Claude Code tabs in a terminal breaks down
Five terminal tabs on one repo is how most people start. It fails in four ways, and agent teams fix only some of them.
- Edits collide. Anthropic is direct about it: "Two teammates editing the same file leads to overwrites." Five tabs in one checkout have the same problem with no task list to warn them.
- Context does not travel. A teammate "loads the same project context as a regular session" (
CLAUDE.md, MCP servers, skills), but "the lead's conversation history does not carry over." Whatever you explained to the lead, the teammate never heard. - Prompts pile up. In a team, "Teammate permission prompts appear in the lead session." Five busy teammates can mean five prompts waiting in one window.
- Nothing survives the session.
/resumeand/rewind"do not restore in-process teammates." Close the terminal and the team is gone.
Turning teams on is two lines. Put this in settings.json:
{
"env": { "CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS": "1" },
"teammateMode": "auto"
}
With teammateMode set to "auto", teammates open in split panes when you run Claude Code inside tmux or iTerm2 and stay in-process elsewhere. In-process, use the arrow keys in the agent panel to select a teammate, Enter to message it, and Ctrl+T to toggle the task list.
2. Give each agent its own folder and branch
The fix for colliding edits is physical separation. A git worktree is "a separate working directory with its own files and branch, sharing the same repository history and remote as your main checkout" (worktrees docs).
claude --worktree feature-auth
claude --worktree fix-417
Each command creates a checkout under .claude/worktrees/<name>/ on a new branch named worktree-<name>. Three settings make it painless:
- Ignore the folder. Add
.claude/worktrees/to.gitignore. - Carry your secrets. A
.worktreeincludefile (gitignore syntax) copies gitignored files such as.envinto every new worktree. - Isolate subagents too. Add
isolation: worktreeto a subagent's frontmatter and it always works in its own checkout.
Cleanup is careful by design. On exit, a clean unnamed worktree is removed with its branch; one with changes or new commits prompts you to keep or remove it.
Inside an agent team, Anthropic's guidance is ownership rather than worktrees: "Break the work so each teammate owns a different set of files." Name the owner in the spawn prompt:
- 1LeadWrites the plan and the task list
- 2API teammateOwns src/api and its tests
- 3Web teammateOwns src/web
- 4ReviewerReads both, edits nothing
Start with work that has clear boundaries. Anthropic's own advice for new teams: begin with "reviewing a PR, researching a library, or investigating a bug" before parallel implementation.
3. Pairing Claude Code specialists with Codex or Gemini reviewers
Every teammate in an agent team is Claude. You can pick the model per teammate ("Use Sonnet for each teammate") or define a reusable role with a subagent file, but the family is the same. A reviewer from the same family tends to share the author's blind spots.
A second opinion from another vendor is cheap insurance on code that matters: auth, billing, migrations. Two ways to set it up:
- By hand. Run Codex or Gemini CLI in a separate worktree, point it at the branch and ask for a review of
git diff main...worktree-feature-auth. - As standing agents. In Fluf, each agent picks its own model. Rune fixes bugs on your installed Claude Code; Quill reviews on Codex; both keep their names, memory and chat between sessions, and message each other by name.
Rune runs in Always ask, so the push waits for your tap; Quill only reads, so it stays in Auto with a Never rule on the terminal.
Comparing the two models head to head? Read Claude Code vs Codex. For quality gates inside a Claude team, Anthropic's TaskCompleted hook can refuse to mark a task done until your checks pass: "Exit with code 2 to prevent completion and send feedback."
4. Reviewing diffs and approving commands from one screen
Parallel agents are only faster if your review keeps up. Know how approvals flow before you spawn five.
In an agent team, prompts from teammates surface in the lead. Two details catch people out:
- You "can't set per-teammate permission modes at spawn time." A new teammate starts with the lead's mode, including
bypassPermissions. - An in-process teammate runs in the lead's mode while the lead is in
acceptEdits,autoorbypassPermissions, even if you switch the teammate to Manual.
The protection that does hold: a message from another agent is marked as such, and "A teammate can't approve a permission prompt or supply consent on your behalf." Anthropic's advice for prompt overload is to pre-approve common operations in your permission settings before you spawn.
For diffs, keep it boring: one branch per agent, git diff main...<branch> per agent, and a pull request per branch. A worktree per agent makes each diff exactly one agent's work.
In Fluf, approvals live with the agent that asked. A risky step arrives as a card in that agent's chat with Approve, Ask for changes and Decline, and every open ask across your agents collects in Home's Questions list. Split view, part of Pro, opens two agent chats side by side (⌘-click an agent), so you can watch the fixer and the reviewer at once. Rules can lock lines no agent crosses, such as Never for Terminal on this computer on agents that should only read. See Permission modes.

5. Checking progress from your phone while builds finish
Long test suites are where parallel agents pay off, and where you walk away. Claude Code has two tools for this:
- Agent view.
claude agentsgives "one screen for all your background sessions," grouped into states such as Working, Needs input and Completed. It "runs sessions on your machine." - Remote Control. Connects claude.ai/code or the Claude mobile app to a session running locally; "Claude keeps running locally the entire time." Start it with
claude remote-control,claude --remote-controlor/rc. It is available on Pro, Max, Ultra, Team and Enterprise plans, and "API keys are not supported." With--spawn worktree, each new session gets its own worktree (Remote Control docs).
Fluf takes the same idea across every agent and model. Pair your phone once at app.fluf.bot with Pro and every agent chat is in your hand, with each ask waiting in the chat it belongs to; conversations are encrypted between your phone and your computer. Agents connected to Telegram send asks there with Approve and Deny buttons. Your computer must stay awake, or connect an always-on server so builds and routines carry on with the laptop closed. See Phone and remote access and controlling AI agents from your phone.
When to use a team, worktrees or persistent agents
| Need | Agent teams | Worktree sessions | Fluf agents on Claude Code |
|---|---|---|---|
| Parallel work in one sitting | Yes | Yes | Yes |
| Teammates message each other | Yes | Partly | Yes |
| Mixed models (Codex, Gemini) on the job | No | Yes, by hand | Yes |
| Survives closing the session | No | Yes, the branch | Yes |
| Approvals on your phone | Partly | Partly | Yes |
"Partly" for teams on phone approvals: Remote Control reaches a local session from the Claude app, but it needs a Claude plan login, not an API key.
Keep your Claude Code agents, not just your sessions
Fluf runs the unmodified Claude Code you installed, signed in through Anthropic's own flow with your own plan, and gives each agent a name, a memory and a place on your team. The rules on using your plan this way are in our Claude subscription pillar. Start free with 6 agents, or compare plans on pricing. Download Fluf and give your fixer and your reviewer their first shared job today.
Questions people ask
- How do I turn on Claude Code agent teams?
- Set CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS=1 in your environment or in the env block of settings.json, then ask Claude in an interactive session to spawn teammates. The feature is experimental and off by default, and it does not spawn teammates in headless -p runs.
- How do Claude Code agent teams compare with Fluf?
- Agent teams are a coding session: one lead plus Claude teammates that end with the session. Fluf runs your installed Claude Code inside named agents that keep their memory, routines and chat for months, lets each agent use a different model such as Codex or Gemini CLI, and sends approvals to your desk, phone or Telegram.
- What do Claude Code agent teams cost in November 2026?
- There is no separate fee; teammates use your Claude plan's limits or your API usage. Anthropic says teams use significantly more tokens than a single session and that token use scales with the number of active teammates. Fluf charges for the app only, from free to $49€49 a month for Pro, with no markup on model usage.
- Can I run parallel Claude Code agents locally with my own AI providers?
- Yes. Agent teams, worktree sessions and Remote Control all run on your machine. In Fluf, agents run on your computer or a server you connect, and each one uses your own Claude Code login, an API key or a local model.
- How do approvals and privacy work with parallel agents?
- In an agent team, teammate permission prompts appear in the lead session, and a teammate cannot approve a prompt on your behalf. In Fluf, each agent has its own permission mode and rules, asks arrive as cards in that agent's chat, and Fluf never sees or stores your Claude credentials.
Sources
- Claude Code: Orchestrate teams of Claude Code sessions, checked 28 November 2026
- Claude Code: Run parallel sessions with worktrees, checked 28 November 2026
- Claude Code: Common workflows, checked 28 November 2026
- Claude Code: Remote Control, checked 28 November 2026
- Claude Code: Agent view, checked 28 November 2026



