aq.dev / guides / run-multiple-claude-code-sessions-in-parallel

How to Run Multiple Claude Code Sessions in Parallel

The fastest way to run multiple Claude Code sessions in parallel is to give each session its own working directory and its own branch, so the sessions never write to the same files. Locally that means one git worktree per task plus a terminal tab or tmux window per session; on a platform like AQ it means one isolated workspace per task, running on a server instead of your laptop.

This guide covers when parallel sessions actually help, how to set them up by hand, where the local setup starts to hurt, and how a workspace platform removes that friction.

Why run Claude Code sessions in parallel?

Parallel sessions pay off when you have independent tasks, not one task you want to split. Claude Code spends most of its wall-clock time reading files, running tests, and waiting on tool calls. While one session grinds through a migration, a second session can fix an unrelated bug and a third can write tests for last week's feature. You review and steer; the agents do the waiting.

What does not work is pointing three sessions at the same task or the same files. Two agents editing the same module produce merge conflicts, clobbered state, and test suites that fail for reasons neither agent caused. The rule is simple: parallelize across tasks, never within one.

Good candidates for parallel sessions:

The local way: one git worktree per session

Running two Claude Code sessions in one checkout is the classic beginner mistake: both agents edit the same working tree and step on each other. Git worktrees fix this. A worktree is an extra working directory attached to the same repository, checked out to its own branch, so each session gets a private copy of the files without a second clone.

cd ~/code/myapp
git worktree add ../myapp-auth -b fix/auth-timeout
git worktree add ../myapp-search -b feat/search-filters

# Terminal tab 1
cd ../myapp-auth && claude

# Terminal tab 2
cd ../myapp-search && claude

Each session now has its own files and its own branch. Use terminal tabs, tmux windows, or separate terminal apps to keep the sessions visually separate. Many people keep a tmux session per task so a session survives closing the terminal window.

This works, and it is the right first step. But run it for a week with three or four concurrent sessions and the friction shows up.

Where the local setup breaks down

None of these are fatal for one person running two sessions. All of them compound for a team running ten.

How does a workspace platform change this?

AQ is the multiplayer workspace where engineering teams run AI coding agents like Claude Code and Codex together: shared live terminals, a code editor, and app previews, in your own cloud. The core idea maps one to one onto the manual setup: each task gets a workspace, and each workspace is an isolated git worktree with its own branch. The difference is that the platform does the ceremony.

When you create a workspace in AQ:

You can run Claude Code in one workspace, Codex in another, and a plain shell in a third; parallel sessions stop being a terminal-management skill and become a list in a sidebar.

How many parallel sessions should you run?

Fewer than you think. The binding constraint on parallel agent sessions is not compute, it is your review bandwidth. Every session produces diffs you must read, decisions you must check, and a PR you must own. Most engineers plateau at two to four active sessions: enough to keep an agent busy while you review another, not so many that unreviewed work piles up.

A practical cadence: keep one session in "steering" mode (you are actively prompting), one or two in "grinding" mode (long task, check in occasionally), and treat anything beyond that as a queue, not a session. Starting a fifth agent before you have reviewed the first one's output does not increase throughput; it increases the pile.

The team angle: parallel sessions you can see

Solo, parallel sessions are a productivity trick. On a team, visibility is the bigger win. In AQ every running workspace is visible to the team (unless it is marked private), so parallel sessions become shared state instead of private terminals:

That changes what "parallel" means: not one engineer juggling terminals, but a team running a fleet of sessions everyone can inspect, hand off, and unblock.

Quick comparison

ConcernLocal worktrees + tmuxAQ workspaces
Isolation per taskManual worktree + branchAutomatic worktree + branch
Dependency installPer worktree, by handAutomatic on workspace creation
Dev-server portsHand-assigned, collidesAllocated per workspace, shareable URL
Session lifetimeDies with your laptopRuns on a server, survives disconnects
Teammate visibilityNoneLive shared terminal, editor, preview
CleanupManual pruneAutomatic teardown

Start with worktrees and tmux; they are free and they teach you the isolation model. When the ceremony, the port juggling, or the "what is your agent doing?" Slack messages start costing real time, move the sessions somewhere your whole team can see them.

Frequently asked questions

Can I run multiple Claude Code sessions in the same directory?

You can, but you should not. Two sessions editing one working tree overwrite each other's changes and corrupt each other's test runs. Give each session its own git worktree (or its own workspace on a platform) so every session has private files and a private branch.

How many Claude Code sessions can I run at once?

Technically as many as your machine or server can hold; practically, two to four. The limit is review bandwidth, not compute: every session produces output you must read and a PR you must own. Add sessions only when you are keeping up with reviewing the ones you have.

Do parallel sessions share one Claude subscription?

Yes. Claude Code sessions authenticate with your Anthropic account, and parallel sessions draw from the same usage limits. On AQ, agents authenticate with each user's own CLI login rather than a shared API key, so usage stays attributed to the person running the session.

What happens to a local session when I close my laptop?

It stops. Claude Code runs in your terminal's process tree, so sleep or shutdown kills the run unless you use tmux on a remote machine. AQ runs each session inside tmux on a server (your VM or an AQ-managed one), so sessions keep running when you disconnect and are live when you return.

Should I split one large task across multiple parallel sessions?

No. Parallel sessions work for independent tasks with independent branches. Splitting one task across agents creates merge conflicts and coordination overhead that erases the speedup. For a large task, run one session and break the work into sequential steps instead.