Run multiple Claude Code agents on parallel branches
Claude Code runs in your terminal against a working directory. Give every Claude Code session its own Git worktree and run as many in parallel as you have tasks.
Why parallel Claude Code matters
- Claude Code is most effective on long, contextual tasks — and those are exactly the ones you do not want to run sequentially.
- Two Claude Code sessions in the same folder will write to the same files and corrupt each other.
- Manually juggling branches with git checkout means losing the agent’s in-flight context whenever you switch.
- Worktrees give every Claude Code session its own sandbox so several can run at once without conflicts.
How to run Claude Code in parallel with ParallelCode
- 1
Create a worktree per Claude Code task
In ParallelCode, create a worktree from the branch you want to base the work on. Each worktree is a normal folder Claude Code can cd into.
- 2
Launch a Claude Code session in each worktree
Open a terminal in each worktree and start Claude Code there. Each session has its own files, history and conversation state.
- 3
Let the agents run
Run multiple Claude Code agents simultaneously — one writes a feature, one refactors a module, one updates docs. They never touch each other’s files.
- 4
Review and merge
Use ParallelCode to review each worktree’s diff, commit, and merge or discard. Failed runs disappear with the worktree.
FAQ
Can Claude Code really run multiple sessions at once?
Yes. Claude Code is just a CLI process tied to a working directory. As long as each session has its own directory (a worktree), there is no upper limit beyond your machine.
Do I need a separate Anthropic API key per session?
No. The same key works across sessions; your usage is billed by tokens, not by parallelism.
Can I mix Claude Code and Cursor across worktrees?
Absolutely. Some teams run Claude Code in one worktree for refactors and Cursor in another for UI work, all in parallel.