All guides

Run multiple Claude Code sessions

Run several Claude Code sessions at once, each on its own branch

You want Claude Code working on several tasks at once. But two sessions in one folder keep getting in each other’s way. Here is how to run several side by side.

Start each Claude Code session in its own git worktree with claude --worktree, so one session’s edits can’t collide with another’s. Every session shares your plan’s usage limit, so several at once use it up faster. Keep every session in one place, so you can see which one needs you.

Why two sessions in one folder clash

Two Claude Code sessions in the same folder edit the same files on the same branch.

While one is halfway through a change, the other runs the tests and trips over the unfinished code. The commits get mixed up too, so it’s hard to tell which session changed what.

A git worktree fixes this. It is a second working folder for the same repository, with its own files and its own branch. It shares the repository’s history with your main checkout.

Give each session its own worktree

A worktree gives a session its own folder and its own branch, so nothing it does gets in another session’s way.

  1. In your project folder, start a session with a name for the task: claude --worktree add-search
  2. In a second terminal, start the next one with a different name: claude --worktree fix-login

Good to know

  • Each session works in its own folder, .claude/worktrees/add-search and so on, on a new branch, worktree-add-search.
  • The branch starts from the repository’s default branch on the remote, usually main.
  • Leave the name out and Claude Code picks one for you, such as bright-running-fox.
  • It needs a git repository. The first time you use Claude Code in a folder, it asks you to trust it.

More on worktrees: pull requests, stray changes and tidying up after a merge

In Mooring: No commands. Select a task in the Cards tab, press ⌘S, then click Create. Mooring makes the worktree and opens a Claude tab in it.

Mooring’s main window. In the sidebar, skiver’s tile, reading SKV, its ticket code, sits in the column on the left, and the panel beside it lists the main folder and three worktrees, each named by its card, with the questions last asked of Claude under the first. The middle is that worktree’s Claude tab, where Claude has just added a sweep that clears stale typing indicators. On the right, the Cards tab lists seven cards, each with its key, status in colour, priority, title and description, among them “Dave has been typing for three days” and “Paginate #random.”
In Mooring: Three worktrees in the sidebar, Claude at work in the first one’s tab.

Set each worktree up once

A worktree starts out like a fresh clone. The source is all there, but nothing git ignores is, such as .env or the installed dependencies.

  1. In your main checkout, keep worktrees out of git status: echo ".claude/worktrees/" >> .gitignore
  2. List the ignored files every worktree needs, such as .env: echo ".env" >> .worktreeinclude. Claude Code copies those files into each new worktree.
  3. Inside each new worktree, install the dependencies, as in a fresh clone.

Clean up when a task is done

When you leave a session, Claude Code tidies up its worktree.

A worktree with no changes is removed, along with its branch. If you gave the session itself a name, Claude Code asks first.

A worktree with changes or new commits is never removed without asking. Keep it, and the folder and the branch stay. Remove it, and both go, work and all.

To tidy up by hand once the work is merged, use git:

  1. List the worktrees: git worktree list
  2. Remove the one you’re done with: git worktree remove .claude/worktrees/add-search
  3. Delete its branch: git branch -d worktree-add-search

Good to know

  • To go back to a kept worktree, run the command Claude Code prints as you leave, such as claude --worktree add-search --resume.
  • A session’s name is its own, not the worktree’s. claude --worktree add-search on its own starts an unnamed session.

In Mooring: No git commands. Choose Remove Worktree… from the worktree row’s ⋯ menu. Mooring removes the folder and the branch, and warns first if work would be lost.

Every session draws on the same usage limit

On a Claude plan, Claude Code shares one usage limit with everything else you do in Claude, in the browser and the desktop app.

The limit belongs to your plan, not to one session. So several sessions at once use it up faster than one.

  1. Type /usage in a session to see your plan’s usage bars.
  2. In your shell, run echo ${ANTHROPIC_API_KEY:+set}. If it prints set, Claude Code bills that key instead of your plan.

Good to know

  • There is a session limit that resets five hours after your first message, and a weekly limit that resets at a set time each week.
  • On Team and Enterprise plans, each member’s Claude Code usage comes from a per-seat allowance, with a five-hour window and a weekly window.
  • Each subagent sends requests of its own, on top of the main conversation.
  • The breakdown in /usage counts only the sessions on that machine.

In Mooring: No /usage to type. The status bar shows your plan’s current five-hour window and the week, with the figures from Anthropic.

Mooring's Claude Usage window over the last 7 days. The skiver project is broken down by worktree, each with a strip of squares showing which days it ran, its value at API prices and its tokens, with the Assistant's own row after them. Beside it, the plan's usage shows the current session and the week.
In Mooring: Each worktree’s last 7 days at API prices, beside the plan’s usage.

Keep track of which session needs you

With four or five terminals open, it’s hard to tell which session has finished, which is waiting for you and which is still at work.

Name each terminal tab after its task, the same name as its worktree. Or run the sessions as panes of one tmux window, tmux new-session -s work, so every session is on one screen.

Good to know

  • In tmux, Ctrl-b % splits the window side by side, and Ctrl-b " splits it one above the other.

In Mooring: No terminals to juggle. A worktree’s row in the sidebar shows Claude working, Your turn or Decide, and the status bar counts the sessions running.

With Mooring

Everything above works with plain Claude Code and git. Mooring takes the juggling away. No terminals to arrange: each task gets a Claude tab in its own worktree, all in one window. No branch names to make up: ⌘S suggests one from the task. No cleanup commands: Remove Worktree… does it. No guessing which session needs you: the sidebar says.

Every worktree in the sidebar, however it was made

Mooring lists each project’s worktrees in its sidebar straight from git, so the ones claude --worktree makes show up too.

A row is named after its branch without the worktree- prefix, so worktree-add-search reads as add-search. A row linked to a task shows the task’s key and title instead.

Worktrees Mooring makes go in the same place, .claude/worktrees in the project, so the two kinds sit side by side.

Mooring’s main window on the skiver project. A column of tiles runs down the left edge, one for each project. The pointer rests on skiver’s tile, which reads SKV, its ticket code, and a popover beside it names the project, skiver, with its ticket code SKV and its folder, ~/Development/skiver, then lists the main folder and the three worktrees, each with its card: SKV-1 “Dave has been typing for three days”, SKV-2 “Rate-limit searches for ‘is it Friday yet’” and SKV-5 “Stay ‘Away’ through a token refresh.” Behind it, Claude is at work in the first worktree’s tab.

A task to its own worktree with ⌘S

In the Cards tab, select a task, press ⌘S, then click Create in the sheet that opens.

Mooring makes a worktree on a branch named after the task, such as worktree-skv-42-add-search, where skv-42 is its ticket key. Then it opens a Claude tab there and hands Claude the task as soon as its prompt is ready.

If Claude isn’t ready within 20 seconds, Mooring says so, and Try Again hands the task over in the same worktree and tab.

See every session that is running

The status bar counts the sessions running in the background. Click the count for a list grouped by project, with any session that isn’t open in a tab listed on its own.

Mooring's main window with the sessions list open above the status bar's session count: 2 in 1 project. Under SKIVER are the two sessions running in the skv-1-dave-is-typing worktree, its Claude tab and its shell tab, each with when it started and buttons to copy, reveal or close it, and Close All for the project.

Find any conversation again

The Sessions window, in the Window menu, lists every Claude conversation Mooring can find, grouped by project. Search by title, project, worktree or branch, then pick one to read it and resume it.

Mooring's Sessions window, its list grouped under skiver. The newest conversation, “Why is search slow every Friday?” in the skv-2-is-it-friday worktree, is selected and expanded to show the sub-agent Claude sent off, “Find every caller of searchMessages…”, marked Sub-agent. Below it are older conversations from the other worktrees and the project folder. On the right the selected conversation is open: the question, and Claude's reply describing the per-workspace limit it added, formatted with bold text and a bulleted list.

See how fast each worktree spends

Choose Usage… from a worktree row’s ⋯ menu for two dials covering the last 60 minutes: the tokens Claude writes a minute and the estimated spend an hour.

The costs are estimates from Mooring’s price table, not a bill.

Mooring's main window with Claude running in skiver's worktrees. The usage panel for skv-1-dave-is-typing is open beside the sidebar: a tachometer reading tokens written a minute and a speedometer reading estimated dollars an hour over the last 60 minutes, and below them the worktree's spend today and so far, the tokens written, and how much was re-read from cache.

Plan limits in view, and a wind-down before one

On a Claude plan, Mooring shows the current five-hour window and the week in the status bar and the Claude Usage window, with the figures from Anthropic.

Near a limit, Mooring can wind your Claude sessions down, and it restarts each one after the limit resets.

More about plan limits in Mooring

The week is at 98% of the plan's limit, and the Assistant asks whether to wind the three working sessions down.

Shown with Skiver, a made-up team chat app for people avoiding work.

Sources

Checked 7 November 2026, from these sources. Spotted something out of date? Say so.

More guides