How to Run Claude Code Sessions in Parallel
Run several Claude Code sessions at once without edits colliding: one git worktree per session, agent view for background tasks, and what it does to limits.

To run Claude Code sessions in parallel safely, give each session its own git worktree: run claude --worktree feature-auth in one terminal and claude --worktree bugfix in another, and each session edits its own copy of the repository on its own branch. For tasks you'd rather hand off and check later, claude agents opens agent view, where every prompt starts a background session. Every session counts against your plan's usage on its own, so ten at once use your limit about ten times as fast.
This guide covers the setup, the cleanup, and how parallel sessions fit with more than one Claude account. Commands and behavior are from Anthropic's Claude Code docs as of November 2026.
Why two sessions in one folder go wrong#
Nothing stops you from opening two terminals in the same project and running claude in both. The trouble starts when both edit files. They share one working copy, so one session can change a file the other just read, run the tests halfway through the other's edit, or commit its neighbour's half-finished work. Read-only sessions (one explaining code while the other answers a question) are fine in the same folder. Anything that writes needs its own checkout.
Option 1: one worktree per session#
A git worktree is a second working folder for the same repository, with its own files and branch but shared history. Claude Code creates and manages them for you (worktree docs):
claude --worktree feature-auth
(-w is the short form.) This creates .claude/worktrees/feature-auth/ at the repository root, on a new branch called worktree-feature-auth, and starts the session there. Run the same command with another name in a second terminal and you have two isolated sessions. Leave the name out and Claude picks one, like bright-running-fox.
A few things to set up once:
- Ignore the folder. Add
.claude/worktrees/to.gitignore, or every worktree shows up as untracked files in your main checkout. - Trust the project first. If you've never run
claudein that repository,--worktreeexits with an error until you run plainclaudeonce and accept the trust prompt. - Copy your env files. A worktree is a fresh checkout, so gitignored files like
.envaren't there. List them in a.worktreeincludefile at the project root (same syntax as.gitignore) and Claude Code copies them into each new worktree. - Install dependencies.
node_modulesand build folders don't come along either. Ask Claude to set up the project, or run your install command inside the worktree.
When you exit, Claude Code checks for changes. If the worktree is clean and you didn't name the session, it removes the worktree and its branch; a named session asks first. If there's uncommitted work or new commits, it asks whether to keep it, and prints a claude --worktree <name> --resume command to come back later.
You can also ask Claude mid-session to "work in a worktree", or create one yourself with git worktree add ../project-feature -b feature when you want it outside the repository or on an existing branch.
Option 2: agent view for tasks you don't need to watch#
If you want to hand off three tasks and check back later, worktrees in separate terminals mean a lot of tab-switching. Agent view puts every background session on one screen (agent view docs):
claude agents
Type a task and press Enter, and it starts as its own background session. Type another and a second one starts beside it. Rows show which sessions are working, which need your input and which are done. Press Space to peek at a session and reply, Enter to attach to the full conversation, and ← on an empty prompt to go back to the list. From the shell, claude --bg "investigate the flaky test" starts one without opening the screen, and /bg inside a running session moves it there.
A session you dispatch from agent view moves into its own worktree before it edits files. Two things to know: agent view is a research preview (the keys may change), and deleting a session in it also deletes the worktree Claude created for it, so commit first.
Option 3: let Claude split the work#
Sometimes one task is the thing you want split. Inside a single session, subagents take side tasks in their own context and report back a summary, which keeps your main conversation clean. The built-in /batch skill splits one large change into 5 to 30 subagents, each in its own worktree. Agent teams, where a lead session assigns work to others, also exist but are experimental and off by default.
In Claude Desktop#
The Code tab in Claude Desktop lists your sessions in the sidebar and runs several in parallel. In a git project, turn on Worktree in the row under the prompt box before you start a session, and it gets its own worktree in the same .claude/worktrees/ folder (desktop docs). Your .worktreeinclude applies there too. If you're deciding between the app and the terminal, see Claude Desktop vs Claude Code.
Parallel sessions and your usage limits#
Background sessions use your subscription the same as interactive ones, so running ten in parallel uses your quota roughly ten times as fast, Anthropic's docs say. Three busy sessions on a Pro plan use up a 5-hour window about three times sooner than one would. Before you scale up, know how the 5-hour and weekly limits work and keep an eye on them with /usage or one of the usage trackers.
Parallel sessions make you faster, but they don't give you more usage. If one account keeps running out, your options are the ones in what to do when you hit the limit: wait for the reset, keep going on usage credits, or move to a bigger plan.
Parallel sessions across more than one account#
Many people who run several sessions also have several real Claude accounts: a client's or employer's seat and a personal Pro, for example. Then each session should run on the account that the work belongs to.
Claude Code picks its account from its configuration folder. Give each account its own folder and start sessions with CLAUDE_CONFIG_DIR set (how that works):
CLAUDE_CONFIG_DIR=$HOME/.claude-acme claude --worktree acme-fix
That session runs as the Acme account in its own worktree, while claude --worktree side-project in the next tab runs as your default account. The usage of each comes out of that account's own limits.
Clawdrobe does the same from the menu bar if your accounts also live in Claude Desktop. Each account gets a claude-<name> command (like claude-acme), so claude-acme -w acme-fix works. An account can also own folders (its Tools → Folders, plus one hook line in ~/.zshrc): plain claude inside a client's folder, or any folder below it such as .claude/worktrees/, runs as that client's account. Turn on "Show the account in Claude Code" in Settings → General and copy the line it shows into ~/.claude/settings.json, and each session's status line shows which account it uses.
Once five or six sessions are open, it's easy to lose track of which tab is which. Clawdrobe 1.7, in beta as of mid-November 2026, adds a "Claude Code now" card to Summary: every Claude Code session running on the Mac, from Terminal or an account's Code tab, with its account, folder and start time. It only reads the process list. Clawdrobe is free for 2 accounts and a one-time $10 for more (pricing).
Pitfalls#
- Two sessions, one branch. Git won't check out the same branch in two worktrees. Let
--worktreemake a new branch per session and merge them when each is done. - Ports and databases. Worktrees isolate files, not your machine. Two sessions that both start a dev server on port 3000 or reset the same local database will still collide.
- Leftover worktrees. Sessions started with
claude -p --worktreehave no exit prompt, so their worktrees stay. Check withgit worktree listand remove them withgit worktree remove(rungit worktree unlockfirst if git refuses). - Running from a subfolder. With the sandbox on,
git commitin a worktree can fail with anindex.lockerror if you startedclaudein a subfolder rather than at the worktree's root. - Wrong account in one tab. Every tab inherits the shell it was opened in. If a session should run on another account, check its status line or
/statusbefore it starts committing.
Quick answers#
Can I run two Claude Code sessions at the same time? Yes. Each terminal running claude is its own session. Give each one a worktree if they edit files.
Do parallel sessions share context? No. Each session has its own conversation. They can pass findings to each other with cross-session messaging, or you can copy what matters between them.
Does running sessions in parallel cost more? It uses your usage limit faster, roughly in proportion to how many sessions are busy. The plan price doesn't change.
Can each parallel session use a different Claude account? Yes, by starting each one with its own CLAUDE_CONFIG_DIR, or with Clawdrobe's per-account commands and folders.
Clawdrobe is an independent Mac app and is not affiliated with Anthropic.
More from the blog
Claude Team costs $25 a seat a month ($20 billed yearly) for 2 to 150 people. What Standard and Premium seats get, how limits work, and Team vs Pro.
Track your Claude usage with Settings → Usage, Claude Code's /usage and status line, ccusage, or Clawdrobe for several accounts. What each one shows and misses.
Claude Desktop is the Mac and Windows app with Chat, Cowork and a Code tab; Claude Code is the coding agent behind that tab and in your terminal. Which to use when.
Every Claude account, side by side
Clawdrobe is free for two accounts. macOS 26 or later · Apple silicon and Intel.

