Guide
How to run multiple Claude Code sessions in parallel
You can run several Claude Code sessions with plain terminals, git worktrees, or a desktop orchestrator. This guide explains all three honestly — including tmux commands and manual worktree setup — and when Aiola is worth adding on top.
The terminal-sprawl problem
One Claude Code session feels great. Two repos with one session each is manageable. Then you add a hotfix branch, a Codex pass on another app, a scheduled automation, and suddenly you are alt-tabbing across six terminals wondering which window had the refactor and which one already merged.
Running multiple Claude Code sessions is not hard to start — it is hard to sustain. The failure modes are predictable:
- Two agents edit the same branch and produce conflicting diffs.
- You close a terminal and lose scrollback that held the plan.
- You forget which project had the agent waiting on a question.
- You want Codex on repo B but only have a Claude tab open on repo A.
This guide walks through three legitimate approaches — from zero extra tooling to a full orchestration app — so you can pick what matches your scale today.
Option 1: Plain terminals (tmux or multiple windows)
The honest baseline is one terminal per session. Install Claude Code once (npm install -g @anthropic-ai/claude-code), run claude login, then start claude in each directory where you need an agent.
Multiple Terminal windows (macOS) or Windows Terminal tabs work fine for two projects. Name each tab after the repo so you can find it later.
tmux (macOS/Linux) or tmux inside WSL (Windows) scales better when you want many panes without losing sessions when you disconnect SSH:
# Start a named session tmux new -s agents # Split horizontally and vertically Ctrl-b % # vertical split Ctrl-b " # horizontal split # In each pane, cd to a project and run claude cd ~/code/project-a && claude cd ~/code/project-b && claude # Detach and reattach later Ctrl-b d tmux attach -t agents
Rules that keep this approach viable:
- One repo per session when possible.
- If two sessions touch the same repo, use different branches and merge manually.
- Write agent output you care about into files or commits — not just scrollback.
- Consider a simple spreadsheet or note listing "which terminal is doing what."
Terminals are free, fast, and transparent. They stop scaling when you want a cross-project dashboard, persistence after reboot, or four vendors at once — but for one or two repos they are genuinely enough.
Option 2: Git worktrees by hand
When two Claude Code sessions must work on the same repository simultaneously, a single working tree is a bottleneck. Git worktrees give each session its own checkout linked to the same .git directory.
Example: main repo at ~/code/myapp, two agent branches.
cd ~/code/myapp # Create branches if they do not exist yet git branch agent/refactor git branch agent/bugfix # Add worktrees (sibling directories) git worktree add ../myapp-refactor agent/refactor git worktree add ../myapp-bugfix agent/bugfix # Terminal 1 cd ../myapp-refactor && claude # Terminal 2 cd ../myapp-bugfix && claude
When an agent finishes, commit inside that worktree and open a PR as usual:
cd ~/code/myapp-refactor git status git add -A && git commit -m "refactor: extract billing module" git push -u origin agent/refactor
Clean up when done:
git worktree remove ../myapp-refactor git worktree remove ../myapp-bugfix git branch -d agent/refactor # after merge
Worktrees are the right manual tool when agents would otherwise clobber each other. The cost is bookkeeping: you manage paths, branches, and cleanup yourself. For two parallel tasks on one repo, that is still often worth it.
Option 3: Aiola — when you outgrow terminals
Aiola is a local desktop app for macOS and Windows that orchestrates coding agents when terminal sprawl stops being acceptable. It is option three — not because options one and two are wrong, but because they do not give you parallel threads with saved state, a cross-project view, or four providers in one window.
What Aiola adds on top of raw terminals:
- Parallel threads — each thread is an independent agent session with chat, diffs, branch, terminal, and optional browser. Run several side by side in split view or on a canvas.
- Auto worktrees — enable run mode and Aiola creates an isolated git worktree per thread so agents do not collide. You skip the manual
git worktree addceremony. - Queued turns — send the next instruction while the agent is still working; Aiola holds the queue instead of you watching scrollback.
- Restore after restart — thread history lives in local SQLite. Close the laptop, reopen Aiola, pick up where you left off.
- Multi-provider — Claude Code, Codex, Cursor, Grok CLI, and OpenCode from one app. Pick the agent per thread or per task instead of locking into one vendor.
- Cross-project view — see active threads, tasks, and recent changes across every workspace without naming tmux panes.
Agents still run on your machine on your own subscriptions. Your code is never uploaded to Aiola — it stays on your machine and goes only to the AI provider you already subscribe to. Aiola is the operations layer, not a cloud runner.
If you run one or two repos and tmux already feels fine, stay on options one or two. If you are juggling three or more projects, mixing vendors, or tired of reconstructing context after every reboot, download Aiola and treat it as the next step — not a replacement for knowing how terminals and worktrees work.
Which option should you pick?
Stick with terminals if you have one or two repos, you are comfortable with branch discipline, and you do not need a portfolio-wide view.
Add manual worktrees when parallel agents touch the same repo and you are willing to manage paths and cleanup yourself.
Use Aiola when parallel sessions are daily life, you want persistence and queued turns, you run Codex or Cursor alongside Claude Code, or you need tasks and automations on top of raw chat.
Most power users start at option one, graduate to option two for collision safety, and adopt an orchestrator when coordination — not coding — becomes the bottleneck.
What are Aiola's current CLI and GUI Lifetime facts?
Aiola supports five agent CLIs: Claude Code, Codex, Cursor, Grok CLI (including grok-4.5), and OpenCode.
GUI Lifetime is available now at launch pricing: first 10 customers $49, next 30 $89, then $129. One-time payment.
GUI Lifetime includes the agent orchestrator GUI only; it does not include hosted analytics, app logs, feedback, or other hosted operations pages.
Your code and repos stay on your machine. Agent prompts and file context are sent only to the AI provider you choose — Anthropic (Claude Code), OpenAI (Codex), Cursor, xAI (Grok CLI), or whichever provider you configure in OpenCode — under your own subscription. Aiola never proxies, stores, or resells your code or model traffic. Threads, tasks, notes, and automations are stored locally (SQLite + plain files in your repo). If you use the optional analytics/logs/feedback layer for your shipped products, that telemetry is ingested via Aiola's cloud (Supabase/Tinybird). Offline: agent orchestration UI works offline; running agents requires provider access; GUI Lifetime keeps the local app opening even if Aiola's servers are unreachable.
FAQ
Can I run two Claude Code sessions in the same repo?
Yes, but they will conflict if both edit the same working tree. Use separate terminal tabs with care, or — better — separate git worktrees or branches so each session has its own checkout. Aiola creates isolated worktrees per thread automatically when you enable run mode.
What is the simplest way to run multiple Claude Code sessions?
Open multiple terminal windows or a tmux session and start `claude` in each, one per project or branch. No extra software required. The tradeoff is no shared history, no central view, and manual discipline to avoid branch collisions.
When should I use git worktrees for Claude Code?
Use worktrees when two or more agents need to work on the same repository at the same time without stepping on each other's files. Each worktree is a linked checkout with its own branch. Aiola automates worktree creation per thread; you can also create them manually with git commands.
Does Aiola replace Claude Code?
No. Aiola orchestrates the Claude Code CLI (and Codex, Cursor, Grok, OpenCode) from a desktop GUI. Claude Code still runs the agent. Aiola adds parallel threads, persistence across restarts, queued turns, and a cross-project view.
Can I mix Claude Code with other agents in parallel?
Yes, in Aiola. Each thread can use a different provider — Claude Code on one project, Codex on another, Cursor on a third — all visible in one window. Plain terminals work too if you install multiple CLIs yourself.
Related
Try parallel threads in Aiola
Download Aiola for macOS or Windows. Run Claude Code, Codex, Cursor, Grok CLI, and OpenCode in parallel with isolated worktrees, queued turns, and a cross-project view — 7-day free trial included.
Download Aiola