Guides

How to run several Claude Code sessions without losing track of them

Updated

Short answer: Give each session its own worktree (claude --worktree <name>) so they never edit the same files, and its own name (claude -n, or /rename) so you can tell them apart and resume them. Then make waiting visible: agent view (claude agents) shows which background sessions need input, and notifications, or Lowtide in your Mac’s menu bar, tell you the moment one is waiting.

One Claude Code session works while you watch. Several work while you do something else, which is the point, and it brings two new problems: sessions that step on each other’s files, and sessions that stop to ask you something while you’re looking at another one. A session waiting for a yes does nothing until you notice.

1. Give each session its own worktree

A git worktree is a second checkout of the same repository on its own branch, so each session edits its own copy of the files. Claude Code makes one for you: claude --worktree (or -w) with a name creates it under .claude/worktrees/ on a new branch and starts the session there. Run it again with another name, in another terminal, for the next session. In Claude’s desktop app, turn on Worktree before you start a session.

Two sessions, two worktrees
# first terminal
claude -w feature-auth

# second terminal
claude -w fix-billing

2. Name every session

Start a session with a name (claude -n auth-refactor) or give it one later with /rename. The name shows in the prompt bar, in /resume and in the terminal’s title, and claude --resume auth-refactor brings it back tomorrow. Anthropic’s advice is to treat named sessions like branches: one workstream each, with its own context.

3. Send long work to the background

claude --bg followed by a prompt starts a session in the background, and /background (or /bg) sends the one you’re in there. claude agents opens agent view, one screen for every background session, showing which are working, which need input, and which are done or failed. Background sessions that edit files move into a worktree of their own first. Agent view is a research preview, so expect it to change.

4. Make waiting impossible to miss

With several sessions, the costly one is the session quietly waiting on a permission prompt. Claude Code can tell you in a few ways:

Common mistakes

Questions people ask

How many Claude Code sessions can I run at once?

Anthropic doesn’t set a number for separate sessions; the practical limit is how many you can keep up with and review. Inside one session, up to 20 subagents run at once by default.

Can two Claude Code sessions work in the same repository?

Yes, if each has its own worktree, so each edits its own copy of the files on its own branch. In the same folder, they can overwrite each other’s changes.

How do I see which Claude Code session needs me?

Agent view (claude agents) shows the state of background sessions, and notifications tell you when one waits. Lowtide lists every session that’s waiting on you, from any terminal or Claude’s desktop app, in your Mac’s menu bar.

Sources

What this guide says about other products and research comes from these sources, checked on the date above.