30People and agents

Parallel agents in separate worktrees

Run several agents at once, each in its own checkout, then review and merge each one.

Cursor, Anthropic, OpenAI, Simon Willison, Jesse Vincent

PersonYouWorker, AgentAgentWorker, AgentAgentWorker, AgentAgentContextWorktreeContextWorktreeContextWorktree
How to read this

The problem

Several agents editing one checkout at the same time collide.

When you have separate pieces of work going at once, give each its own checkout so the edits can’t collide.
AnthropicBest practices for Claude Code
Use worktrees when you want to start several agents on the same repo without conflicts.
CursorWorktrees

Therefore

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.
AnthropicRun parallel sessions with worktrees
Worktrees let Agent work in isolated Git checkouts. Each task gets its own files, dependencies, and changes while your main checkout stays untouched.
CursorWorktrees
Worktrees let Codex run multiple independent chats in the same project without interfering with each other.
OpenAIWorktrees

In use

Jesse Vincent

When I want to start a new task on an existing project, I try to always use a git worktree to isolate that work from other tasks.
Jesse VincentHow I'm using coding agents in September, 2025Oct 5, 2025

Simon Willison

I haven’t adopted git worktrees yet: if I want to run two agents in isolation against the same repo I do a fresh checkout
Simon WillisonEmbracing the parallel coding agent lifestyleOct 5, 2025

Cursor

Cursor automatically creates and manages git worktrees for parallel agents.
CursorBest practices for coding with agentsJan 9, 2026

Where it breaks

Review becomes the bottleneck, a fresh checkout lacks ignored files and dependencies, and a branch lives in one checkout at a time.

AI-generated code needs to be reviewed, which means the natural bottleneck on all of this is how fast I can review the results.
Simon WillisonEmbracing the parallel coding agent lifestyleOct 5, 2025
A worktree is a fresh checkout, which means gitignored files like .env aren’t there and dependencies aren’t installed.
AnthropicBest practices for Claude Code
If you check out a branch on a worktree, you can’t check it out in your local checkout at the same time, and vice versa.
OpenAIWorktrees

Sources

  1. Best practices for coding with agentsLee Robinson, Cursor, Jan 9, 2026
  2. Run parallel sessions with worktreesAnthropic
  3. WorktreesCursor
  4. WorktreesOpenAI
  5. Best practices for Claude CodeAnthropic
  6. Embracing the parallel coding agent lifestyleSimon Willison, Oct 5, 2025
  7. How I'm using coding agents in September, 2025Jesse Vincent, Oct 5, 2025

Added Nov 14, 2026