How do I manage many Claude Code sessions at once?
Give each session a name and its own worktree, keep them in tmux or Claude Code's agent view, and see at a glance which one needs you.
Give every session three things: its own folder (a git worktree on its own branch), a name you will recognise later, and one place where you can see all of them. For the place, Claude Code's claude agents lists its background sessions and which ones need you; tmux keeps any terminal session alive in named windows; and a session manager puts every agent in one window grouped by project. The pain of "fifty terminal windows" is mostly the last part: you cannot tell which window is waiting for you.
Why do many sessions get out of hand?#
Each session is a separate terminal tab with the same prompt in it. After five or six, three things go wrong:
- You lose track of which is which. Tab titles all read
claude, and the first screen of each looks the same. - A session waits for you without you noticing. A permission prompt in a background tab can sit for an hour.
- Two sessions edit the same files. Sessions in one folder on one branch overwrite each other.
The fixes below take each one in turn.
How do I keep sessions from editing each other's files?#
One git worktree per session, each on its own branch:
cd ~/code/shop
git worktree add ../shop-export -b export
git worktree add ../shop-refunds -b refundsStart one session in each folder. Running parallel Claude Code sessions covers worktrees in depth, including dependencies, ports and how many sessions are worth running at once.
How do I find and resume a session later?#
Claude Code keeps every conversation per folder:
| You want | Command |
|---|---|
| The last session in this folder | claude --continue |
| A list of past sessions to pick from | claude --resume |
| A readable name in that list | /rename inside the session |
| Every background session and its state | claude agents |
Naming is the cheapest habit here. "export csv" is easy to find in a list; the first line of a prompt often is not.
How do I keep them all in one terminal?#
tmux runs sessions inside one terminal and keeps them alive when the window closes:
tmux new -s shop -n export
# Ctrl-b c opens a new window, Ctrl-b , renames it
# Ctrl-b w lists every window
# Ctrl-b d detaches; tmux attach -t shop brings it all backOne tmux session per project and one named window per agent keeps the list short. tmux knows nothing about agents, though: it cannot show which window is waiting for an answer.
How do I see which session needs me?#
Turn on notifications so a waiting session reaches you. In Claude Code, /config sets the notification channel, and a Notification hook can run any command when a session waits. Getting a notification when Claude Code is waiting has the hook. Claude Code's agent view (claude agents) also marks the sessions that need input, for Claude Code sessions only.
What if I use more than Claude Code?#
Each agent has its own list: codex agents for Codex CLI, the Agents Window for Cursor. None of them shows the others. Seeing what your coding agents are doing compares the built-in views.
Where does Joxo fit?#
Joxo's desktop app has a Terminal (Beta) that holds every agent session in one window, grouped by project, and marks each one as working, done or needing you. It works with every agent you use and with a plain shell. The same sessions show in the Joxo iPhone app, so a session waiting for an answer can be answered away from the desk. Getting started has the setup.
Frequently asked questions#
How many Claude Code sessions can I run at once?#
Claude Code sets no fixed number; your plan and your own review time decide how many are useful. Most people find two to five parallel tasks is as many as they can review well.
Can two Claude Code sessions share one folder?#
They can, but they will overwrite each other's changes. Give each session its own git worktree and branch.
How do I rename a Claude Code session?#
Type /rename followed by the name inside the session. The name shows in claude --resume, so you can pick the session later.
Does tmux keep Claude Code running after I close the terminal?#
Yes. Detach with Ctrl-b d or close the window; the session keeps running inside tmux, and tmux attach brings it back.