Skip to main content
command CX Codex

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

Install into Claude Code · Plugin marketplace All methods and platforms ↓
/plugin marketplace add rohitg00/pro-workflow
/plugin install pro-workflow@pro-workflow
Open on GitHub

What 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: worktree to its frontmatter

How to install parallel

1Plugin marketplace

/plugin marketplace add rohitg00/pro-workflow
/plugin install pro-workflow@pro-workflow

2Manually: put the files in place

.claude/commands/parallel.md

Call it with /parallel. For all projects use ~/.claude/commands/

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

Similar slash commands

All slash commands for Git and GitHub →

From the same set83

The whole set →
scout scout examines a codebase before implementation and rates readiness across five dimensions. Use it to see whether the task is ready to start or needs more investigation. CX Codex ★ 2,966repo stars core-rules core-rules — a rule file for your project: commit checks, Git habits, context discipline and the way the agent replies. Paste it into CLAUDE.md or keep it standalone. CX Codex +1 ★ 2,966repo stars context-optimizer The context-optimizer command checks context window fill rates in Claude Code and helps cut token waste before responses degrade. CX Codex +1 ★ 2,966repo stars module-map The module-map skill builds a compact map of an unfamiliar codebase area, covering entry points, core modules, data flow, and callers. Use it when you need to get oriented. CX Codex +1 ★ 2,966repo stars session-handoff session-handoff generates a structured handoff document capturing git state, open tasks, decisions, and a resume prompt for your next session. CX Codex +1 ★ 2,966repo stars replay-learnings The replay-learnings skill searches project memory and similar sessions for lessons tied to a new task. Run it before coding to bring earlier corrections into view. CX Codex +1 ★ 2,966repo stars skill-optimize skill-optimize runs an offline optimization loop over a skill's accumulated examples, proposes improvements to its description file, validates candidates, and updates only when performance strictly improves. CX Codex +1 ★ 2,966repo stars orchestrate orchestrate coordinates multi-phase feature development with research, planning, gated implementation, and code review in Claude Code. CX Codex +1 ★ 2,966repo stars

Project sponsors

Companies that keep this analytics open