# Running Agents in Parallel

import { Callout } from "nextra/components";

Run agents side by side, conflict-free.

## The Workflow

### Step 1 — Create panes

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

<PaneCreator />

### Step 2 — Assign tasks

In each pane's terminal, give the agent its instructions. Because each pane runs in an isolated worktree, agents work on independent copies of your codebase.

### Step 3 — Monitor

Notifications alert you when an agent finishes or needs input — no need to babysit each terminal.

## Let an Agent Create the Panes

Pane's `runpane` CLI is agent-operable. If you already have a list of issues or tasks, you can ask your current agent to set up the next panes for you.

```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
```

The agent can use `runpane agent-context --command "panes create"` when it needs the full schema for pane creation, or fetch [`/runpane-cli-contract.json`](/runpane-cli-contract.json) before installing. See [runpane CLI](/docs/runpane-cli#typical-agent-workflow) for the complete flow, including registering a repository with `runpane repos add`.

## Tips

- **Write self-contained tasks.** Agents that touch overlapping files will cause merge conflicts when you go to integrate. Scope each task to a single feature or file boundary.
- **Notifications do the waiting for you.** Enable desktop notifications in Settings → Notifications so you're alerted the moment an agent finishes or needs input — no polling required.
- **Review and commit each pane independently.** Use <KeyCombo keys={["⌘", "⇧", "K"]} /> to commit a pane's work, then move to the next. Integrate via your normal PR or merge flow.

<Callout type="info">
  There is no hard limit on simultaneous panes. In practice, the bottleneck is API rate limits from your agent provider, not Pane itself.
</Callout>

<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`, …). You can rename them after creation.

Bulk creation is useful when you have a list of known tasks and want to queue them all before reviewing outputs.

</Toggle>
