How to run multiple Claude Code sessions in parallel
One Claude Code session is great until you’re waiting on it. While it writes tests, you want a second one fixing a bug, and a third reading through a part of the codebase you don’t know yet. Running several at once is easy. Keeping them from getting in each other’s way takes a little setup.
Here are three ways to do it, from the simplest to the most organised.
The one rule: one folder per agent that writes
Two agents editing the same files at the same time will overwrite each other’s work, and neither will notice. So before picking a setup, decide which sessions will change code:
- Agents that only read (answering questions, reviewing, planning) can share a folder safely.
- Agents that write should each get their own copy of the repo. Git worktrees make that cheap, as shown below.
Option 1: terminal tabs or tmux
The quickest start: open a terminal tab per session and run claude in each. That works for two sessions. Past that, it gets hard to see which one is waiting for you.
tmux keeps them all on one screen:
tmux new -s agents # start a tmux session
# Ctrl-b % split left and right
# Ctrl-b " split top and bottom
# run `claude` in each pane
You can detach with Ctrl-b d and come back later with tmux attach -t agents, and the agents keep working in the meantime.
Good for: people who already live in tmux. Watch out for: it won’t tell you which pane needs an answer. You have to look.
Option 2: git worktrees, one per agent
A git worktree is a second checkout of the same repo, on its own branch, in its own folder. It shares the repo’s history, so it’s quick to make and doesn’t copy the .git folder.
git worktree add ../myapp-tests -b add-tests
git worktree add ../myapp-bugfix -b fix-login
cd ../myapp-tests && claude # agent 1
cd ../myapp-bugfix && claude # agent 2, in another tab
Each agent now writes on its own branch. When one is done, review its branch and merge it like any other. Clean up with git worktree remove ../myapp-tests.
Claude Code can also make one for you: claude --worktree <name> starts a session in a new worktree under .claude/worktrees/.
Good for: any time two or more agents change code. Watch out for: each worktree needs its own install step (npm install and the like), and ports can clash if every copy starts a dev server.
Option 3: a desktop app that runs them side by side
Tabs and tmux run the sessions, but you’re the one who keeps track of them. A desktop app can do that part. Nojace is the one we build: it runs the real claude CLI (and Codex, OpenCode, or any other CLI agent) in real terminals, organised by folder.
- Every session in one sidebar, grouped by folder, with a green dot while an agent works and a yellow one when it’s waiting for you. You get a notification when one finishes or asks something.
- Worktrees from the sidebar: click + next to a folder, choose new worktree, name the branch, and a session starts there. Worktrees sit under their repo, including the ones Claude Code made itself.
- Review what each agent changed as diffs, comment on lines, and send the comments back to the agent as one message.
- Sessions you started in a terminal show up too, so nothing needs importing.
Good for: running three or more agents, or mixing Claude Code with other agents. Watch out for: it’s an app to install, on Mac or Linux.
Which one to pick
- Two sessions, one reads and one writes: two terminal tabs are enough.
- Several agents writing code: use worktrees, whichever way you run them.
- Many sessions across several repos, or more than one kind of agent: a desktop app saves you from keeping track by hand.
Whichever you choose, the rule stays the same: give every agent that writes its own folder, and review each branch before you merge it.
Published