Managing Multiple AI Coding Sessions Without Losing Track

Running one AI coding session at a time is straightforward. Running several across multiple projects is where things fall apart. Here’s how to stay organized.

The problem

You start Claude Code in one terminal to add authentication. You open another for a different project’s bug fix. A third for writing tests. Maybe a fourth for a code review.

Within an hour you have a wall of terminal windows and can’t remember:

  • Which session is working on what
  • Whether that auth feature was approved or is waiting on you
  • If two agents are editing the same files
  • What happened in the session you started this morning

This isn’t a Claude Code problem — it’s a “running multiple autonomous agents” problem. And it gets worse as AI agents become more capable and you trust them with larger tasks.

Strategy 1: One project, one terminal

The simplest approach. Each project gets its own terminal window or tab. Label your tabs with the project name.

Pros: Easy to set up, works with any terminal.

Cons: Doesn’t scale past 3-4 projects. No way to track what’s happening inside each session without switching to it. If you close the terminal, the history is gone.

Strategy 2: tmux or screen

Terminal multiplexers let you create named sessions, split panes, and detach/reattach.

# Create a named session for each project
tmux new-session -s api-auth
tmux new-session -s frontend-fix
tmux new-session -s test-suite

# Switch between them
tmux switch-client -t api-auth

Pros: Sessions persist even if you close the terminal. Named sessions help with organization. Keyboard-driven workflow.

Cons: Steep learning curve. No visual overview of what each session is doing. You still need to switch into each session to see its status. Managing approval requests across sessions means jumping between panes.

Strategy 3: Purpose-built session management

Tools designed specifically for AI coding sessions solve the organization problem at the UI level.

Crystl takes this approach for macOS. Projects are organized as gems, each with its own terminal sessions called shards. The Crystal Rail — a glass bar at the edge of your screen — shows all your projects at a glance with color-coded indicators.

When Claude Code requests an approval in any session, Crystl shows a floating panel on your screen without interrupting what you’re doing. You can approve or deny from any context. This means you don’t need to switch to a terminal window just to click “Allow.”

Every session’s history is preserved, so you can come back the next day and see exactly what happened.

Running parallel agents on the same repo

The trickiest scenario is running two AI agents on the same project simultaneously. If both agents edit the same files, you get conflicts.

Git worktrees

The solution is git worktrees — a git feature that creates a separate working copy of your repo on its own branch:

# Create a worktree for the second agent
git worktree add ../my-project-auth feature/auth

# Now you have two separate directories:
# my-project/          (main branch)
# my-project-auth/     (feature/auth branch)

Each agent works in its own directory on its own branch. No conflicts.

When the work is done, merge the branch back:

git merge feature/auth
git worktree remove ../my-project-auth

Automated worktrees

Setting up worktrees manually for every parallel task gets tedious. Crystl automates this with isolated shards — when you create one, it sets up a git worktree under the hood, opens a terminal in that directory, and cleans up the worktree when you close the shard.

This lets you spin up a parallel Claude Code session on the same repo in seconds, without thinking about git plumbing.

Best practices

  1. Name your sessions. Whether you’re using tmux sessions, terminal tabs, or gems in Crystl — give each one a clear name so you can find it later.
  2. One task per session. Don’t pile unrelated tasks into a single Claude Code session. Start a new session for each distinct task.
  3. Check on long-running sessions. AI agents can go down rabbit holes. Periodically check that each session is making progress.
  4. Use branches. Always start AI work on a branch. If something goes wrong, you can discard the branch without affecting main.
  5. Preserve history. Whether through scrollback, tmux logging, or a tool like Crystl that saves automatically — make sure you can review what happened later.