Hameau
← All articles

5 December 2026

How to run several Claude Code sessions in parallel without losing track

One Claude Code session running the tests, another refactoring authentication, a third writing the docs: once you've tried it, it's hard to go back to just one. But past three or four sessions, two problems show up fast: they step on each other's toes in the same repository, and you lose track of which one is waiting for an answer.

Here is the method we use every day, with the tools Claude Code already ships.

1. One session, one worktree

Two sessions editing the same files in the same folder is a recipe for conflicts. The fix: give each session its own git worktree, a separate working copy on its own branch that shares the repository's history.

Claude Code can do it for you:

claude --worktree feature-auth

The session starts in .claude/worktrees/feature-auth/, on a new branch worktree-feature-auth. In a second terminal, claude --worktree fix-payments opens a second, fully isolated session. Without a name (claude -w), Claude makes one up.

Two details that save you surprises:

  • add .claude/worktrees/ to your .gitignore;
  • files ignored by git (a .env, say) are not copied into worktrees. List the ones you need in a .worktreeinclude file at the root of the repository.

Prefer to stay in control? The manual way works too:

git worktree add ../project-feature-a -b feature-a
cd ../project-feature-a && claude

2. Name your sessions so you can find them again

"Which one was on the payment bug, again?" Name each session from the start:

claude -n auth-refactor

or, along the way, /rename auth-refactor. To get back to a session later:

  • claude --continue reopens the most recent session in the current folder;
  • claude --resume opens the session picker, and claude --resume auth-refactor goes straight to that one.

3. Know who is waiting for you

This is the real friction point: a session sits blocked for twenty minutes on a permission prompt while you were looking elsewhere.

Built-in notifications. In /config, the "Local notifications" option (preferredNotifChannel) picks how Claude Code alerts you: terminal bell, iTerm2, Kitty or Ghostty notifications. Start there.

A Notification hook. To go further, Claude Code fires a Notification event when it needs you: when a permission prompt has been waiting for a few seconds, or when it has finished responding and you haven't typed anything for about a minute. You can plug in any command. For example, a macOS notification, in ~/.claude/settings.json:

{
  "hooks": {
    "Notification": [
      {
        "hooks": [
          {
            "type": "command",
            "command": "osascript -e 'display notification \"A Claude Code session is waiting for you\" with title \"Claude Code\"'"
          }
        ]
      }
    ]
  }
}

We explain how hooks work in detail in a dedicated article.

4. Background sessions

Not every session needs an open terminal. claude --bg starts a session in the background, claude agents lists the ones running, and Claude Code's agent view lets you follow them from a single screen. Handy for long, quiet tasks: a migration, a test suite, a dependency audit.

5. A few rules that change everything

  • One task per session, with a clear, checkable goal ("the e2e tests pass"), rather than a catch-all session.
  • Start with three. Beyond that, your review capacity becomes the bottleneck, not Claude.
  • Review in batches. Instead of answering each session as it comes, go around all of them every 15 or 20 minutes.
  • An orchestrator for big jobs. A session that splits the work and leads the others saves you from playing project manager yourself. Claude Code's subagents (defined in .claude/agents/) are made for this.

And to see everything at a glance

That's exactly the problem that made us build Hameau: each Claude Code session becomes a resident of a little 3D village. Its window lights up when it works, it waves at you when it's waiting for your answer, and the orchestrator takes the main building with the sessions it leads. All of it runs on the hooks we just covered.


Sources: official Claude Code documentation, worktrees, sessions, hooks, terminal notifications and agent view.