parallel — Claude Code command: isolated worktree sessions
Run multiple Claude Code sessions in parallel with isolated git worktrees. Ideal for working on features, testing, and code review simultaneously without file conflicts.
MIT ★ 2,966 updated 2026-09-29
/plugin marketplace add rohitg00/pro-workflow
/plugin install pro-workflow@pro-workflowWhat parallel does
The /parallel command sets up isolated working copies using git worktrees. Claude Code 2.1.49+ has built-in support: claude -w automatically creates a worktree and launches a session inside it. For more control, manually create worktrees with git worktree add ../[project]-feat [branch] and run Claude in each one separately.
Each session runs independently—changes in one worktree don't affect others. This is useful when you need to review code on main, develop a feature on another branch, and experiment on a separate track all at once. Subagents can also run in isolated worktrees by adding isolation: worktree to the agent's frontmatter.
Clean up with git worktree remove ../[project]-feat and git worktree prune. While working, send the current task to the background with Ctrl+B or kill all background agents with a double-press of Ctrl+F.
What it helps with
- run multiple Claude Code sessions without file conflicts
- develop a feature while tests run on another branch
- review code and write new code at the same time
- explore multiple approaches in parallel
Example prompts for the agent
- Start a parallel session:
claude -w - Create a worktree for a feature branch:
git worktree add ../project-feat feature-branch - Enable worktree isolation for a subagent by adding
isolation: worktreeto its frontmatter
How to install parallel
1Plugin marketplace
/plugin marketplace add rohitg00/pro-workflow/plugin install pro-workflow@pro-workflow2Manually: put the files in place
.claude/commands/parallel.mdCall it with /parallel. For all projects use ~/.claude/commands/
Manually: put the files in place
~/.codex/prompts/parallel.mdCall it with /prompts:parallel. Codex marks this format deprecated in favour of skills
Manually: put the files in place
.github/prompts/parallel.prompt.mdManually: put the files in place
.gemini/commands/parallel.tomlGemini stores commands as TOML: the prompt text goes into the prompt field
Questions about parallel
How do I install parallel in Claude Code?
Run /plugin marketplace add rohitg00/pro-workflow, then /plugin install pro-workflow@pro-workflow. The command will be added to .claude/commands/parallel.md.
What does parallel do?
It creates isolated git worktrees for each Claude Code session, letting you work on different branches simultaneously without file conflicts.
Do I need to set anything up manually?
No. claude -w handles worktree creation automatically. You can manually create worktrees with git worktree add for more control, but the built-in mode works out of the box.
Source text
parallel.md · MIT
--- description: Set up parallel Claude Code sessions with isolated git worktrees. --- # /parallel - Worktree Setup Guide Set up parallel Claude Code sessions using git worktrees. ## Native Worktree Mode (Claude Code 2.1.49+) Claude Code now has built-in worktree support: ```bash claude --worktree claude -w ``` This creates an isolated git worktree automatically and runs Claude inside it. No manual setup needed. ### Subagent Worktree Isolation Subagents can also run in isolated worktrees: ```yaml # In .claude/agents/my-agent.md frontmatter isolation: worktree ``` This gives each subagent its own working copy, preventing file conflicts. ## Current State ```bash git worktree list ``` ## Manual Worktree Setup For cases where you want more control: ```bash git worktree add ../[project]-feat [branch-name] git worktree add ../[project]-fix [branch-name] git worktree add ../[project]-exp -b experiment ``` ## Usage Pattern ``` Terminal 1: ~/project → Main work (or `claude`) Terminal 2: ~/project-feat → claude --worktree (auto-isolated) Terminal 3: ~/project-fix → claude -w (shorthand) ``` Each worktree runs its own Claude session independently. ## When to Use | Scenario | Recommended Approach | |----------|---------------------| | Quick parallel task | `claude -w` (auto worktree) | | Tests running | Start feature in worktree | | Long build | Debug in parallel | | Exploring approaches | Compare 2-3 simultaneously | | Review + new work | Reviewer in one, dev in other | | Background exploration | Subagent with `isolation: worktree` | ## Managing Background Agents - `Ctrl+F` — Kill all background agents (two-press confirmation) - `Ctrl+B` — Send current task to background - Background agents continue running when you press ESC ## Cleanup ```bash git worktree remove ../[project]-feat git worktree prune ``` --- **Tip:** `claude -w` is the fastest way to parallelize. Like having a dev team you can clone.
© Rohit Ghumare · MIT · rohitg00/pro-workflow