BlogParallel agents
How do I run multiple Claude Code agents in parallel?
Open one terminal per task and start each Claude Code session in its own git worktree with claude --worktree <name>, so the agents never edit the same checkout. If you would rather not manage the terminals yourself, Claude Code can also run background sessions that you dispatch and watch from one screen with claude agents. Either way, the hard part is not starting agents. It is knowing which one needs you.
The options Claude Code gives you
As of October 2026, Claude Code's documentation lists five ways to work on several tasks at once: subagents, agent view, agent teams, dynamic workflows, and projects. For "I want three agents working on three tasks", two of them matter most:
- Separate interactive sessions, each in its own worktree. You drive each one.
- Agent view (
claude agents), a research preview. You dispatch background sessions and check their state from one table.
Subagents and agent teams solve a different problem: Claude splitting one task, not you running several. See subagents vs multiple sessions.
Method 1: one terminal and one worktree per session
1. Start the first session
From your repository root:
claude --worktree feature-auth
Claude Code creates .claude/worktrees/feature-auth/ on a new branch named worktree-feature-auth and starts the session there. The short form is -w.
2. Start the others
Open a new terminal tab and run the same command with another name:
claude -w fix-billing-rounding
claude -w flaky-settings-test
Each session now edits its own copy of the files. If you leave out the name, Claude Code generates one.
3. Name the sessions
Give each session a name you will recognize later:
claude -w feature-auth -n "auth: magic link"
/rename changes the name mid-session, and /color tints the prompt bar, which helps when several tabs look the same.
4. Carry your local files over
A worktree is a fresh checkout. Gitignored files like .env are not there. Add a .worktreeinclude file at the repository root, in .gitignore syntax:
.env
.env.local
Also add .claude/worktrees/ to .gitignore so the worktrees don't show up as untracked files.
5. Clean up
When you exit a session, Claude Code checks the worktree. If it is clean and the session has no name, it is removed with its branch; a named session (-n) asks first. If there is work in it, Claude Code asks whether to keep it. For worktrees you created by hand, use git:
git worktree list
git worktree remove ../project-feature-a
If you use tmux, claude -w feature-auth --tmux creates a tmux session for the worktree.
Method 2: background sessions with agent view
Agent view is in research preview as of October 2026, so its interface and shortcuts may change.
claude agents
Type a task and press Enter. Each prompt starts a new background session that shows up as a row: working, needs input, idle, completed, failed or stopped. Press Space to peek at a row and reply, Enter to attach to the full conversation, and ← on an empty prompt to detach.
You can also dispatch from your shell:
claude --bg "investigate the flaky SettingsChangeDetector test"
Before a background session edits files in a git repository, Claude moves it into its own worktree under .claude/worktrees/. Background sessions keep running without a terminal attached, and they survive sleep but stop if the machine shuts down.
Limits of these methods
- Your attention is the bottleneck. With separate tabs, nothing tells you which tab is waiting for a permission prompt. A desktop notification fires only when you seem to be away from the terminal, and by default only in Ghostty, Kitty and iTerm2. See how to know which session is waiting.
- Agent view only lists background sessions. Interactive sessions in other terminals don't appear until you background them. Subagents and teammates aren't listed as separate rows.
- Usage multiplies. Every session draws from the same plan limits. Ten parallel agents use quota roughly ten times as fast as one.
- Worktrees aren't full isolation. They share the repository's
.gitdirectory, and anything outside the checkout, such as a local database or a port, is still shared. - It only covers Claude Code. If you also run Codex CLI or Gemini CLI, you track those somewhere else.
With Kanbell
Kanbell is a macOS app (Apple Silicon) that keeps the terminal-and-worktree method and adds the overview it lacks.
- One window per project, with real terminals in panes and tabs. You start
claude,claude -w, or any other CLI agent in them as usual. - State per agent. For Claude Code, each agent shows working, waiting or done, and whether it waits on a question or a permission. Codex CLI and Gemini CLI show their state and permission waits too. Other CLI agents run in the terminals without tracking.
- Waiting is visible. An orange dot appears in the window, in the menu bar and in the overview, with a macOS notification. ⌘⇧J jumps to the next agent that is waiting.
- Git next to the terminals. Changes, diffs, history and worktrees sit in a panel beside the sessions, so you can see what each worktree changed.
- Usage in one place. For Claude Code, Kanbell shows your subscription usage for the session and the week while you launch more agents. It does not reduce consumption.
Kanbell has no account and no Kanbell server. Your agents still talk to their own providers.
FAQ
How many Claude Code sessions can I run at the same time?
Claude Code's parallel-work documentation names no cap on sessions. The practical limits are your plan's usage, since each session draws from it independently, and how many sessions you can review.
Do parallel sessions share my usage limits?
Yes. Each session, background session and subagent sends its own requests against the same plan limits, so ten sessions use quota roughly ten times as fast as one.
Can two sessions work in the same folder?
They can, but they will edit the same files. Give each session its own git worktree unless the tasks are read-only.
What is the difference between claude --worktree and claude agents?
claude --worktree starts an interactive session in an isolated checkout that you drive yourself. claude agents opens agent view, a research preview that lists background sessions, their state, and which ones need your input.