# Running Agents in Parallel

Claude Code can build the login page while Codex fixes a bug in the same repo, because each [pane](/docs/panes-and-worktrees) is a separate git worktree on its own branch. Two features that change the same lines still conflict when you merge, so give each agent its own feature or set of files.

## The Workflow

<a id="step-1---create-panes"></a>

### Step 1: Create panes

Press <KeyCombo keys={["⌘", "N"]} /> (macOS) or <KeyCombo keys={["Ctrl", "N"]} /> (Windows/Linux) for each feature. Give each pane a descriptive feature name. It becomes the branch name.

<PaneCreator />

<a id="step-2---assign-tasks"></a>

### Step 2: Assign tasks

In each pane's terminal, give the agent its instructions.

<a id="step-3---monitor"></a>

### Step 3: Monitor

Pane sends a notification when an agent finishes or needs input, so you don't have to watch each terminal. Pick which ones in **Settings → Notifications**.

<a id="tips"></a>

### Step 4: Review and commit each pane

Use <KeyCombo keys={["⌘", "⇧", "K"]} /> to commit a pane's work, then move to the next. See [Review and commit](/docs/review-and-commit).

> **Note:** There is no hard limit on simultaneous panes. Each pane is a worktree that checks out the repo, installs dependencies and often builds, so creating many at once can freeze your machine. Add tabs to a feature's pane instead of creating panes for its reviews and QA.

<Toggle title="Creating several panes at once">

In the **New Pane** dialog, open **Advanced** and slide **Panes** up to 5 to create several panes at once. Each pane gets an auto-incremented branch name suffix (`feature-1`, `feature-2`, …).

</Toggle>

## Let an Agent Create the Panes

Ask the agent you're talking to, or a [Session](/docs/sessions), to set up the panes:

| You ask | The agent |
| --- | --- |
| "Open a pane for each of issues 252, 253 and 254 and have Codex plan them." | Creates three panes on new branches, starts Codex in each with its issue, and waits until each one is ready. |
| "Here are my five features. Give each one its own pane and agent." | Creates all five panes in one call from a JSON list, each on its own branch with its own task. |

<Toggle title="The commands the agent runs">

```bash
runpane doctor --json
runpane agent-context --json
runpane repos list --json
runpane panes create --repo active --name issue-252 --agent codex --prompt "Plan issue 252" --source agent --wait-ready --yes --json
runpane panels wait --panel <panel-id> --for ready --json
runpane panels screen --panel <panel-id> --limit 80 --json
```

For a list, it writes the panes to a file and runs `runpane panes create --from-json panes.json --yes --json` ([format](/docs/runpane-cli#creating-multiple-panes-at-once)). For a review or QA tab on existing work, it runs `runpane panels create --pane <id>`. It can read one command's full schema with `runpane agent-context --command "panes create"`, or fetch [`/runpane-cli-contract.json`](/runpane-cli-contract.json) before installing.

</Toggle>

The agent does this with the [`runpane` CLI](/docs/runpane-cli#typical-agent-workflow) or Pane's [MCP tools](/docs/mcp). [Agents Managing Agents](/docs/agent-loops) has every command.
