How to manage multiple AI coding agents

Give each agent its own git worktree so they don't edit the same files. Then pick how the work is coordinated: subagents inside one session, separate sessions you check on, or a lead that assigns work. Watch which agent is waiting on you, and review and merge each branch one at a time.

Step 1. Give each agent its own copy of the code

"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."
"Running each Claude Code session in its own worktree gives it a separate copy of the files to edit, so one session can build a feature while a second fixes a bug."

Source: Claude Code docs (Anthropic)

claude --worktree <name>
"Do the tasks touch the same files? Isolate the work with worktrees."

Source: Claude Code docs (Anthropic)

Step 2. Choose how the work is coordinated

Use subagents for a side task inside one conversation; they return a summary. Use separate sessions for independent tasks that should keep going on their own. Give each session its own worktree if they edit the same files.

Inside one session: subagents

"Delegated workers inside one session that do a side task in their own context and return a summary"

Source: Claude Code docs (Anthropic)

Several sessions you hand off: agent view (claude agents)

Start each session in its own worktree with claude --worktree <name> in a separate terminal, or hand tasks off from agent view with claude agents, which shows each background session as working, waiting on you, or done. Anthropic labels agent view a research preview, and it may change.

Source: Claude Code docs (Anthropic)

A lead coordinating workers: Claude Code agent teams

"One session acts as the team lead, coordinating work, assigning tasks, and synthesizing results."
"Agent teams are experimental and disabled by default."

Source: Claude Code docs (Anthropic)

"Agent teams don't isolate teammates in worktrees"

Source: Claude Code docs (Anthropic)

Scripted fan-out: dynamic workflows

"Use them for codebase audits, large migrations, and cross-checked research."

Source: Claude Code docs (Anthropic)

Step 3. Know which agent needs you

Do I need a separate tool?

Not always. If you only run Claude Code, its worktrees and agent view may be enough. A separate manager helps when you run several different AI tools and want one place to see them.

"Agent view is in research preview. The interface and keyboard shortcuts may change as the feature evolves."
"showing whether it's working, waiting on you, or done"

Source: Claude Code docs (Anthropic)

Claude Squad

"a terminal app that manages multiple Claude Code, Codex, Gemini (and other local agents including Aider) in separate workspaces, allowing you to work on multiple tasks simultaneously."

github.com/smtg-ai/claude-squad

Conductor

"Conductor lets you run Claude Code, Codex, Cursor, and OpenCode in parallel. Each task gets its own workspace, branch, files, terminal, diff, and review path."
"Get Conductor running on your Mac."

Conductor docs, Introduction

If you want roles and a Lead

One option built around a Lead and roles:

Heliopause by Coco Research
It gives your AI tools a Lead and roles, like a small company, on your own machine.

One page shows each agent as working, idle, blocked, or needs you. If you connect GitHub, failed checks show up as problems.

Heliopause runs on 127.0.0.1. No account, no telemetry, no remote sync. Optional GitHub lookups go through your own gh, read-only, and the AI tools you use still talk to their own services.

Step 4. Review and merge one at a time

"Require explicit developer approval before merging any AI-generated code."

OWASP Cheat Sheet Series, Secure Coding with AI

"parallelize independent investigation and edits; serialize decisions and changes that touch the same contract, file, or source of truth. Keep every result inspectable, then place a human review gate before the work is accepted."

Agent.Space blog, multi-agent coding workflow

"Merge or cherry-pick one branch at a time. Re-run the full validation suite from the final integrated branch."

Warp docs, how to run multiple AI coding agents

Guardrails

Costs and limits to know

"Running several sessions or subagents at once multiplies token usage."

Source: Claude Code docs (Anthropic)

Agent teams

"use significantly more tokens than a single session"

Source: Claude Code docs (Anthropic)

FAQ

How many agents should I run at once?

There's no fixed number. The limits are how much you can review and your plan's usage limits.

What's a git worktree, and why give each agent its own?

"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."
"Running each Claude Code session in its own worktree gives it a separate copy of the files to edit, so one session can build a feature while a second fixes a bug."

Source: Claude Code docs (Anthropic)

What are Claude Code subagents?

Claude Code's docs describe subagents as delegated workers inside one session that do a side task in their own context and return a summary.

Are Claude Code agent teams ready to use?

Claude Code's docs say agent teams are experimental and disabled by default. They use significantly more tokens than a single session, and teammates aren't put in separate worktrees, so give each one different files.

How do I know which agent needs my attention?

If you only use Claude Code, agent view (claude agents) shows each background session as working, waiting on you, or done. Anthropic labels it a research preview, and it may change. If you use several tools, a manager that runs each agent in its own workspace can show them in one place.

How do I avoid merge conflicts between agents?

Give each agent its own worktree, give agents different files to work on, and merge one branch at a time, re-running your tests after each merge.

Can I use agents from different vendors together?

Yes. Claude Squad describes itself as "a terminal app that manages multiple Claude Code, Codex, Gemini (and other local agents including Aider) in separate workspaces", and Conductor's docs say it "lets you run Claude Code, Codex, Cursor, and OpenCode in parallel."