Run multiple Claude Code sessions at once without losing track

How to run several Claude Code sessions in parallel: isolate their files, name and resume them, use background agents, and keep the whole pile in sight.

· 5 min read

You can run as many Claude Code sessions as your machine and your plan allow: one terminal per session, each its own conversation. The hard part is not starting them. It is keeping their files apart, remembering which is which, and noticing the one that has been waiting for your answer for twenty minutes. Here is a setup that works from the plain CLI.

#Can you run several Claude Code sessions at the same time?

Yes. Every claude process is an independent conversation, saved as a transcript under ~/.claude/projects. Nothing stops you from opening five terminals.

Two things to know up front. First, sessions draw on the same plan limits, so five busy sessions use your 5-hour window faster than one (see Claude Code usage limits). The agent view docs say it directly: each session uses your subscription quota independently. Second, your attention is the real bottleneck. Three sessions you can follow; eight you cannot, unless you set things up so the screen tells you which one needs you.

#How do you keep parallel sessions from overwriting each other?

Give each session its own files. Two sessions in one checkout share one working tree, and a git commit in one will include the other's half-done edits. The clean fix is a git worktree per session:

claude --worktree feature-auth
claude --worktree fix-login-bug   # in a second terminal

Each gets .claude/worktrees/<name>/ on its own branch. If you must share a checkout, split by area: one session in api/, another in web/, and neither touches the other's folder. Then commit often and review git status before every commit so you know what is whose.

Research-only sessions (reading code, answering questions, drafting a plan in plan mode) do not edit anything and can share a checkout with anything.

#How do you name and find a session later?

Unnamed sessions get a generated title from your first prompt, which is fine for one session and useless for six. Name them:

claude -n auth-refactor          # at startup

or /rename auth-refactor inside the session, or Ctrl+R on a row in the picker. Then come back by name:

claude --resume auth-refactor    # resume directly
claude --resume                  # open the picker
claude --continue                # most recent session in this directory

In the picker, Space previews a session, Ctrl+B filters to the current git branch and Ctrl+W widens the list to every worktree of the repository. Naming a session after its branch is the cheapest habit in this article.

One trap: if you resume the same session in two terminals at once, both write to one transcript and messages can go missing. Add --fork-session to each when you want two copies of a conversation. Inside a session, /branch does the same: it copies the conversation so far and switches you to the copy.

#What are background sessions and agent view?

Claude Code can run sessions without a terminal attached and show them on one screen. This is labelled a research preview in the docs, so shortcuts may change.

claude --bg "investigate the flaky settings test"   # start one in the background
claude agents                                       # one screen for all of them

Inside a normal session, /background (or /bg) detaches it, and pressing ← on an empty prompt opens agent view. Each row shows a state: working, needs input, idle, completed, failed or stopped. Select a row and press Space to peek at the question or the result, type to reply from the peek panel, press Enter to attach fully, and ← to detach again. Detaching never stops a session. claude stop <id> does, and claude rm <id> removes it.

Background sessions that edit files in a git repository move into a worktree first, so they do not write to your checkout. When their work is done in a worktree they commit and push the branch and may open a draft PR; the docs say they never push to main or master, force-push or merge. Also note that interactive sessions in other terminals do not appear in agent view until you background them.

#How do you know which session is waiting for you?

This is the part terminals are bad at. Options, from cheap to thorough:

  • Terminal tab titles. Agent view puts the number of sessions awaiting input in its tab title.
  • Notifications. Claude Code hooks can run a script when a session needs attention, for example to send a desktop notification or play a sound.
  • Permission modes. Fewer prompts mean fewer stalls. Reading the permission modes page is worth ten minutes if you run sessions in parallel; a session blocked on a harmless ls prompt is wasted time.
  • A status habit. End long prompts with "when you finish, summarize what changed and what you could not verify". The summary is what you will read when you come back.

#What is a sensible limit?

Start with two or three sessions, each with a clear, separate task, and add a fourth only when you notice you are idle. A workable split:

SessionJobFiles
FeatureThe thing you are buildingIts own worktree
BugOne small fix or investigationIts own worktree
QuestionsReading code, planning, explainingShared, read-only

Close or /clear sessions you are done with. A session that has run for hours carries a long context and costs more per turn; see the context window.

#In Relais

Relais is a desktop app built around exactly this problem. Sessions are real Claude Code sessions (claude --resume opens any of them), sorted by project in a sidebar. A row is blue while it runs, orange while it waits for you, green once its changes are pushed and red on an error. A "Needs you" list gathers what is waiting across every project, with a soft sound and a notification when a session finishes or asks something. A session can also get its own worktree and branch from a checkbox. Everything still counts toward your Claude plan's limits. See features.

Claude Code,
better organized.

$14.99 a month, everything included. Mac and Linux, on your Claude Pro or Max plan. Cancel any time.