OmniscioGuidesMultiple Claude Code sessions
How to run multiple Claude Code sessions at once
Give each session its own git worktree, keep the work separate, and watch them all from one place. The worktree stops two agents writing the same file; the rest is scheduling and attention. The rest of the page covers the four things that go wrong: files, usage limits, context and cost.
- Dependency upgradeNeeds You
- API refactorRunning
- Test suiteRunning
- Docs syncReady
Last tested on Claude Code 2.1.301, October 16, 2026. By the Omniscio team. Updated .
How we tested this
Tested October 16, 2026: Claude Code 2.1.301 on Linux x64.
Every block is a real session in a throwaway repo under /tmp, from one seed: two small modules whose tests failed differently.
Two sessions took one failure each in their own worktrees: one pair through --worktree, one through git worktree add by hand, then two sessions in one shared directory with no isolation.
A block opens with the command and prints the output. ... marks a cut line; a block omitting anything else says so.
Two limits on what is here
- Linux only. Windows and macOS went untested; those lines come from git's reference or Anthropic's docs.
- No cleanup-prompt capture. It needs an interactive session; the runs used
-p, which Anthropic says skips it and leaves the worktree in place.
Sections describing what we did not run name Anthropic's page; those pages and every rival's site were read October 22, 2026. The runs are from October 16, not claimed for a later version.
Why run more than one Claude Code session at a time?
An agent works in bursts: read, think, write, wait. Parallel sessions fill the gaps.
The gain is real but smaller than it looks: the cost moves, it does not disappear.
- One session: you wait.
- Six: you triage which is stuck, which is finished, which went wrong silently.
What breaks first when you run several sessions?
Four things, in order. None is about the machine; three are shared resources.
1. Two agents writing the same file
Two sessions in one directory edit one file; the last write wins. Neither is warned, because neither sees the other holding that path, and the lost work disappears quietly.
The fix is a worktree per session.
2. Usage limits, hit several times faster
Parallel sessions share one subscription: Anthropic's agent view docs say background sessions consume usage like interactive ones, so ten agents use quota about ten times as fast as one.
- Subscription: a five-hour window and a weekly window, shared across all models, so
/modeldoes not restore a spent window. - Claude Console: a workspace spend limit and the workspace's rate limits.
The count is often set by the accounts behind the sessions, not by your CPU. Fewer sessions, a smaller model for mechanical work, and a cap set first keep a fleet running.
Which account a session uses then matters: Multiple Claude accounts in Claude Code covers two subscriptions at once, the switcher tools, and how a pool picks one.
3. Conversations that grow until they are mostly history
A long session carries its whole conversation, and stale context is paid for on every message. Anthropic’s cost page recommends /clear when you switch to unrelated work.
Auto-compact is where Claude Code summarizes older history. It warns about the conversation, not a usage limit, and is easy to miss across six sessions.
The parallel fix: one session per task, replaced when the task changes. Reuse one and a fleet of two costs what six would.
4. Cost, and the attention to notice it
Token usage multiplies with sessions, and a stuck agent retrying in a loop turns an experiment into a bill.
- A spend limit where it is billed: a workspace spend limit on a Console account, a monthly one in Settings > Usage on Pro and Max, and the admin-set limits on Team and Enterprise.
- A status view separating "still running" from "still making progress"; tell those apart and the cost problem mostly solves itself.
To price a fleet, the cost calculator takes the tokens each session should use.
What are the ways to run several sessions side by side?
Five, least to most machinery; all but the first give each session its own copy or terminal.
Two sessions that share a window collide in one more way: a VS Code notice saying the conversation is still open somewhere else. And work that has to leave the editor as commits is the git commit guide.
All five ways below leave the coordinating to you. Anthropic's own tool for handing that job to Claude is Claude Code Projects, which starts and tracks cloud threads for you on a Pro, Max or Ultra plan; the Claude Code Projects guide covers it.
One of the five is Anthropic's own terminal screen for the job: agent view, opened with claude agents, lists every background session with what it needs and lets you reply without leaving the list. The agent view guide covers it.
Way 1. A second terminal window or tab
Open another terminal and run claude again: two windows, two sessions, both working at once.
Both sit in one directory unless you move one, so both edit your real checkout, safe only if the tasks touch different files, which nothing enforces. Tabs die with the window.
Way 2. A terminal multiplexer such as tmux
tmux puts panes and windows in one terminal, and its sessions survive the terminal closing. One session per pane.
$ tmux new -s agent-one
$ tmux new -s agent-two
$ tmux ls
agent-one: 1 windows (created ...)
agent-two: 1 windows (created ...)As tmux 3.4 runs them; timestamps cut with .... Every session still sits in the directory you started it in, so this fixes the closed window, not the shared file.
Way 3. A git worktree per session
A git worktree is a second working directory on the same repository, on another branch.
They share history, so merging is ordinary git, but each has its own files: an agent editing src/app.ts in one cannot touch another session's copy.
Two ways: Claude Code makes it, or git worktree add does. The first puts the checkout where Claude Code expects it; the second works on any version and lets you pick the directory.
Let Claude Code make the worktree
Pass --worktree a name, as in claude --worktree part-one: the session opens at .claude/worktrees/<name>/ on a new branch, worktree-<name>. Add .claude/worktrees/ to .gitignore so they stay untracked.
Both are the non-interactive -p form, which is why they carry permission flags: without --permission-mode acceptEdits a -p run cannot write a file; without --allowedTools "Bash" it cannot run tests. Run the same command with a second name in another terminal and both sessions run at once, each against its own copy.
$ claude -p --worktree one "Run node test/run.js. Fix only src/part-one.js ..." --permission-mode acceptEdits --allowedTools "Bash"
/tmp/fdemo/.claude/worktrees/one
1 failing
$ claude -p --worktree two "Run node test/run.js. Fix only src/part-two.js ..." --permission-mode acceptEdits --allowedTools "Bash"
/tmp/fdemo/.claude/worktrees/two
1 failingBeforehand the same run answered 2 failing, one per module. Each session returned its worktree path, then 1 failing: its failure fixed, the other module still broken in its copy. ... is the rest of the prompt.
Git's list shows both checkouts on their own branches. locked means Claude Code holds the worktree while the session runs, so a cleanup sweep cannot take it.
A -p run has no exit prompt, so it never cleans its worktree up: the lock stays after the run ends, until a later session's stale-lock sweep releases it.
$ git worktree list
/tmp/fdemo 1ba2530 [main]
/tmp/fdemo/.claude/worktrees/one 1ba2530 [worktree-one] locked
/tmp/fdemo/.claude/worktrees/two 1ba2530 [worktree-two] lockedInside a worktree session, the checkout is a boundary
We asked a session in /tmp/iso/.claude/worktrees/iso3 to write to the main checkout by absolute path, with --output-format stream-json so the refusal came back as data:
$ HOME=/tmp/fakehome claude -p --worktree iso3 "Use the Write tool right now to write the single line export const beta = 2 into the file at /tmp/iso/src/thing.js . Do not ask me anything ..." --permission-mode acceptEdits --output-format stream-json --verbose
{"type":"user","message":{"role":"user","content":[{"type":"tool_result",
"content":"<tool_use_error>This session is isolated in the worktree /tmp/iso/.claude/worktrees/iso3.
Edit the worktree copy of this file instead of the shared-checkout path.</tool_use_error>", ...The main checkout still read export const alpha = 1; ... is the rest of the tool result and prompt. The throwaway HOME was deliberate: otherwise the model refused in prose before calling the tool.
Anthropic's worktrees page gives the four checks: an edit aimed at the main checkout, a command whose working directory resolves there, one that redirects git there, and one whose text does not prove where its git runs.
Or make the worktree yourself
Branch from where you want the work to start; finishing is then an ordinary merge from an ordinary branch.
$ git worktree add -b fix-part-one ../ms-demo-wt-a
Preparing worktree (new branch 'fix-part-one')
HEAD is now at 2a8a7b2 seed
$ git worktree add -b fix-part-two ../ms-demo-wt-b
Preparing worktree (new branch 'fix-part-two')
HEAD is now at 2a8a7b2 seed
$ git worktree list
/tmp/ms-demo 2a8a7b2 [main]
/tmp/ms-demo-wt-a 2a8a7b2 [fix-part-one]
/tmp/ms-demo-wt-b 2a8a7b2 [fix-part-two]A session ran in each directory at once, one failure each. Both returned 1 failing, and the main checkout still held both broken tests: neither reached outside its own directory.
Two things git and Claude Code will refuse
One branch cannot be checked out twice, which keeps two sessions off the same files. Git enforces it:
$ git worktree add /tmp/ms-demo-wt-c main
Preparing worktree (checking out 'main')
fatal: 'main' is already used by worktree at '/tmp/ms-demo'That exited 128. A worktree needs something to branch from: with no commits, Claude Code stops before the session opens.
$ git rev-parse HEAD
fatal: ambiguous argument 'HEAD': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git <command> [<revision>...] -- [<file>...]'
HEAD
$ claude -p --worktree nothing "Say only the word ok."
Error creating worktree: Failed to resolve base branch "HEAD": git rev-parse returned no commit
for HEAD (for example in a new repository, or on a branch without a commit yet), so Claude Code
has nothing to base a worktree on. ...The ... is the rest of the message; the git Claude Code runs may not be the one in your shell. Commit something first.
Way 4. Claude Code's own parallel options
Anthropic built several in, each for a different question. Short version of the five on its Run agents in parallel page, read October 22, 2026.
| Option | What it does | Best for |
|---|---|---|
| Subagents | Delegated workers inside one session, each with its own context, returning a summary. | A side task that would flood your main conversation. |
Agent view (claude agents) | One screen of background sessions on your machine, with what is working and what needs you. A research preview. | Several independent tasks you hand off and check back on. |
| Agent teams | Several coordinated sessions with a shared task list and messaging between them, run by a lead. Experimental and disabled by default. | Work Claude can split, assign and keep in sync itself. |
| Dynamic workflows | A script that runs many subagents and cross-checks their results. | Work too big for one pass: a wide audit or a large migration. |
| Projects | One conversation at claude.ai/code that starts parallel threads in the cloud, or on your computer when you ask, and shows which ones need you. Public beta on Pro and Max. | Work spanning days that should keep going with your machine off. |
The desktop app: sessions in a sidebar, two side by side in a split view or each in its own window, and a Worktree switch per session, off by default.
With it on, the session runs under .claude/worktrees/ — Way 3's isolation, no commands.
Agent teams stay off until you set CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS=1, and all of these orchestrate Claude; for Codex and Claude in one list, or one view across several repositories, take the next way.
Subagents, agent view and worktrees have their own treatment in the parallel agents guide; the selection guide covers the rest of agent view, and the five cases where its worktree isolation does not apply.
Way 5. A manager that holds them for you
Past three or four sessions the work stops being "start an agent" and becomes "which one needs me now".
Which to pick has its own answer: AI coding agent orchestration compares Herdr, Orca, T3 Code and Omniscio across isolation, attention and cost.
Each row comes from that tool's own site or repository, read on October 22, 2026; we ran none.
| Tool | Shape | Platforms |
|---|---|---|
| Claude Squad | A terminal app: one tmux session and one git worktree per task, in one window. Needs tmux and the GitHub CLI. AGPL-3.0. | macOS and Linux, plus a published Windows build that fails on every new session. |
| opcode | A desktop GUI for Claude Code built with Tauri, with a session list and background agents. | Its two published releases carry macOS and Linux packages, and no Windows build. |
| Paradev (formerly Superset) | Superset is a desktop workspace with a changes pane, pull request review inside the app, an MCP server for its own agents, a TypeScript SDK, and an iPhone and iPad app. It has completed a SOC 2 Type II audit. | macOS. Its Linux AppImage is labelled experimental, and Windows is not available. |
| Vibe Kanban | A board that puts tasks in front of agents rather than sessions in a list. Open source, and community maintained since its maker, bloop, shut down in April 2026. | Windows, macOS and Linux. |
| Conductor | A desktop app for running several Claude Code, Codex, Cursor and OpenCode agents, with cloud sandboxes on isolated microVMs as well. It is a Mac-first product, which is why the Conductor alternative page exists. | macOS, with an iOS app and an API. |
| Claude Code's own desktop app | Sessions in a sidebar with a split view and a per-session worktree switch, covered in Way 4 above. It orchestrates Claude Code and nothing else. | Windows, macOS and Linux. |
| Omniscio | The app we make: sessions in one list with the ones waiting on you at the top, a diff viewer, Plain Speak cards, and optional per-session worktree isolation. | Windows, macOS and Linux. |
Claude Squad's Windows build installs but cannot start a session (issue #275), expensive to learn late. Vibe Kanban still runs locally and takes commits; a closed company only changes who fixes it next.
The tool-by-tool pages go further: Claude Squad, Superset, Vibe Kanban, Conductor, Paseo and Claude Code's desktop app. If the tool you are weighing is Windsurf, it is now Devin Desktop, and the Claude Code vs Windsurf page covers how its board of agents compares with running Claude Code sessions directly.
How do you run them once they exist?
Choose independent work first
Do not split one task across sessions: two agents on the same feature overlap, and reconciling the partial solutions costs more than the one change.
Pick work on different files: a test suite, a refactor elsewhere, a research question, a dependency upgrade. Check first for two sessions editing one file.
Pick the engine per session, not per habit
A long mechanical pass (renaming, updating tests, one change across twenty files) needs no frontier reasoning, and running it there is where parallel sessions get expensive fast.
Keep the strong model for planning and hard debugging; send the rest somewhere cheaper. On one session, changing the model decides your afternoon; on six, it is one line in one of them.
Switching engines also switches which rules file is read: Claude Code starts at a CLAUDE.md, Codex at an AGENTS.md. Our AGENTS.md guide covers the default, the override, and the rule that turns AGENTS.md off silently.
Make every session's state visible
Terminal windows hold the information, and none says one agent has waited twenty minutes on a question.
You want one view: a status per session (running, waiting for you, failed, stalled or done), the ones needing a person apart. Then six sessions are one glance, not six transcripts.
Merge one at a time, and only when it is finished
Parallel branches tempt you to leave them all open. Merge each as it completes, verify it, then start the next piece from the updated base.
A branch open a week drifts, and one large merge is harder than four small ones.
We merged the two Way 3 worktrees one at a time, suite in between:
$ git merge --no-edit worktree-one
Updating 1ba2530..a585345
Fast-forward
src/part-one.js | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
$ node test/run.js
FAIL part-two: partTwo(10) should be 13, got 20
1 failing
$ git merge --no-edit worktree-two
Merge made by the 'ort' strategy.
src/part-two.js | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
$ node test/run.js
all tests passTwo one-line diffs, a suite run after each: the first merge was a fast-forward, the second a merge commit. No conflict needed resolving — files kept the work apart.
Which mistakes cost the most time?
- Parallelising one task. Two agents on one feature collide. Split by file and concern.
- Sharing a directory. Without a worktree per session, two agents edit the same files at once and nothing stops them: one commits the other's half-finished edit, or runs the tests mid-rewrite, mixing two changes never meant to be one.
- Starting with eight. Start with two or three while you learn your triage habits; adding more is easy once the routine settles.
- No spend cap on the lanes that bill per token. A stuck agent retrying in a loop turns an experiment into a bill, and nothing stops that for you, so set the cap first. Flat-fee subscriptions are not capped this way; watch the plan windows.
- Treating "it is still running" as "it is making progress". A session retrying the same failing command for twenty minutes looks like one that works, unless something tells you which is which.
- Leaving everything unmerged. Long-lived branches drift, and merging five at the end is one large change nobody can verify rather than five small ones.
Reproduced: two sessions in one directory
Two sessions in one directory, each given a different single-line rewrite of the same file, started together. Both exited 0 and reported success. What each said it wrote, then what the file held:
$ claude -p "Rewrite src/thing.js from scratch so it contains exactly one line: export const beta = 2 ..." --permission-mode acceptEdits --allowedTools "Bash"
export const beta = 2
$ claude -p "Rewrite src/thing.js from scratch so it contains exactly one line: export const gamma = 3 ..." --permission-mode acceptEdits --allowedTools "Bash"
export const gamma = 3
$ cat src/thing.js
export const gamma = 3Session one's line was gone, and its own run reported the file as written. Nothing warned either session: neither could see another agent holding the same file, and git had one working tree. A worktree makes each file its own — all of Way 3.
Where does Omniscio fit?
Everything above works by hand; Omniscio, the app we make, covers the three habits this guide ends on without replacing the worktrees.
- A session can run in its own git worktree on its own branch, off until you turn it on for one session, a project or the whole app.
- Every session carries one of eleven statuses, the ones waiting on you on top.
- A per-session spend cap stops a session when its cost crosses your limit, on the lanes that bill per token, not a flat-fee subscription.
It is built around a group of sessions; concurrent multi-session orchestration is the detail. It runs on Windows, macOS and Linux, and the features page lists what is in it today.
Two additions: Plain Speak rewrites a long reply into a card you read at a glance, and a phone view over the web reaches you when a session finishes while you are away.
Switch it on in Settings. Its connection is private to your signed-in devices by default; reaching it from the public internet is a separate switch, off until you turn it on.
Sources
Every factual line on this page rests on one of these. The runs are from October 16, 2026; every documentation page and every rival's own site was read again on October 22, 2026, and the dates below are the days they were read.
- Claude Code: run parallel sessions with worktrees, for
--worktree, where the checkout is created, theworktree-<name>branch,.worktreeinclude, what happens when you exit, and the four isolation checks. Read October 16, 2026. - Claude Code: common workflows, for the
claude --worktreecommand and the failure a repository with no commits gives instead. Read October 16, 2026. - Claude Code: run agents in parallel, for the five options (subagents, agent view, agent teams, dynamic workflows, projects) and the three tools beside them. Read October 22, 2026.
- Claude Code: agent view, for
claude agents, background sessions, the quota statement and the limitations list. Read October 22, 2026. - Claude Code: the desktop app, for parallel sessions in a sidebar, the split view, and the per-session Worktree switch that is off by default. Read October 22, 2026.
- Claude Code: agent teams, for experimental status and
CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS=1. Read October 22, 2026. - Claude Code: manage costs effectively, for switching model with
/model, clearing with/clear, the auto-compact window, the five-hour and weekly windows, and where API spend is capped. Read October 22, 2026. - git worktree, the command's own reference, for the one-checkout-per-branch rule. Read October 16, 2026.
- Every claim about another tool, from that tool's own site or repository: Claude Squad issue #275, open since April 7, 2026, and its README; opcode's published releases and repository; Superset; Vibe Kanban and its releases; Conductor. All read October 22, 2026.
- What Omniscio itself does comes from our own documentation library, linked in the section above, and our features page, read October 22, 2026.
Claude Code's worktree behaviour changes often enough that its own documentation keeps notes beside each change, such as "Before v2.1.208" and "Before v2.1.239". Run claude --version and open the worktrees page again before you trust a copy of this page from a few months back.
Common questions
How many Claude Code sessions can I run at once?
The limit is usually attention, not the machine. Two or three well-chosen sessions is a real gain over one; past about five, triage cost outweighs the parallelism unless your tooling keeps what needs you on top.
Does Claude Code have a built-in way to run several sessions?
Yes, and it has grown. Anthropic documents five ways to take on several tasks at once: subagents inside one conversation, agent view (claude agents) for background sessions on one screen, agent teams, dynamic workflows, and projects in the cloud. The desktop app also runs sessions side by side, each optionally in its own worktree.
Can two agents work in the same repository at the same time?
Yes, if each gets its own worktree. Without that isolation two sessions edit the same files at once and nothing stops them. That is how one commit ends up mixing two changes that were never meant to be one.
Why do parallel sessions hit usage limits so quickly?
Every session is billed and counted on its own, so ten sessions use subscription quota about ten times as fast as one, which is the first limit Anthropic's own agent view documentation names. Fewer sessions, a cheaper model for mechanical work, and a cap on spend each take the pressure off.
Do I need a special tool to do this?
No. Worktrees plus a terminal will do it. A manager saves the bookkeeping once you are running more than a handful.
Run your first parallel session today
Install Omniscio, start three sessions on independent work, and be a thousand of yourself. The features page lists what is in it today, and the Windows guide covers the platform details.