How to run multiple Claude Code sessions in parallel
To run several Claude Code sessions at once without them colliding, point them all at one shared task queue. Each session leases the next unclaimed task, so they self-divide the work — no overlap, no coordination overhead — and a live cockpit shows who's on what.
The problem with raw parallel sessions
Opening three Claude Code windows on the same repo feels like 3× the speed. Without coordination it usually isn't:
The fix: one shared queue + leases
Put all the work in a single ranked queue and have every session pull from it. The key is leasing: when a session takes a task, that task is marked in progress for a few minutes, so every other session skips it and pulls the next one down. That gives you:
- Dynamic division — not static assignment. You never say "session 1 does tasks 1-10." The split balances itself: a fast session simply pulls more.
- Self-scaling — one session works the queue in sequence; five sessions run the top five in parallel. Add or remove sessions freely and the division adapts.
- Crash-safety — if a session dies mid-task, its lease expires and the task returns to the queue for someone else.
- One source of truth — "what's next?" has a single answer for every session, across every project.
Step by step
- Put all the work in one shared queue. Rank it once. (TaskPrio is one global priority queue your sessions all read from.)
- Connect each session over MCP. Install once per machine; every Claude Code session on the project can then call
get_next_task:curl -fsSL https://promptprio.com/install.sh | sh - Open N sessions and start the loop in each. Paste the autopilot prompt in each window — they all pull from the same queue.
- They self-divide. Each
get_next_taskleases the top unclaimed task; the others skip it. No collisions, no manual hand-off. - Watch them in the Sessions cockpit. See which session is on which task, what's idle, throughput per session, and value-per-token — so the fleet stays legible.
Specialize: a session per role
For a bigger backlog you can give each session a job instead of letting all of them pull everything. Tag tasks by role and run role-scoped sessions — e.g. one that only pulls review tasks and one that only pulls build tasks. Each session pulls only its kind of work from the same shared queue, so you specialize a fleet without splitting it into separate boards.
Pipelines: when one task must follow another
Not all work is independent. Mark a task as depending on another (dependsOn) and it stays out of the queue until its prerequisite is done — so "write the migration" only becomes pullable after "design the schema" completes. Parallel where work is independent; ordered where it isn't.
Frequently asked questions
Can I run multiple Claude Code sessions at once?
Yes — on the same project. Point them at one shared, leased queue so they self-divide instead of colliding.
How do I stop them grabbing the same task?
Leasing. A task pulled with get_next_task is marked in progress, so other sessions skip it. If a session crashes, the lease expires and the task returns.
How many should I run?
Match it to queued work; ~3-5 is a practical sweet spot for a busy backlog. The leased queue makes the split adapt to whatever number you run.
How do I see what each is doing?
The live Sessions cockpit shows every connected agent: current task, idle state, throughput, and value-per-token.