> ## Documentation Index
> Fetch the complete documentation index at: https://ade-ac1c6011-dependabot-github-actions-actions-cache-6.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Multi-agent setup

> Run several agents safely by giving each task its own lane, watching for collisions, and choosing the grid when you want to compare attempts.

The safest multi-agent setup is simple: one lane per task, one clear goal per agent, and a review pass before merge. Isolation is what keeps parallel agents from writing over each other — give each its own worktree and the collisions disappear.

<Frame caption="Launch agents in the background and supervise them as they work.">
  <img src="https://mintcdn.com/ade-ac1c6011-dependabot-github-actions-actions-cache-6/mZiHD0-x8whDsXL3/media/features/agent-chat/launch-in-background.webp?fit=max&auto=format&n=mZiHD0-x8whDsXL3&q=85&s=3dc68b383dffd6c71e08c922d355c828" alt="Launching agents in the background and supervising them" width="1948" height="1350" data-path="media/features/agent-chat/launch-in-background.webp" />
</Frame>

## One lane per task

Every lane is its own git worktree — its own branch, files, and sessions. That isolation is the whole game: two agents in two lanes can't touch each other's working tree, so they run in parallel without stashing, rebasing, or fighting over the same files.

<Steps>
  <Step title="Split the work">
    Turn a large goal into small, independent, lane-sized tasks.
  </Step>

  <Step title="Create one lane per task">
    Name lanes after the outcome, not the agent.
  </Step>

  <Step title="Start one chat per lane">
    Keep each prompt scoped to that lane's goal.
  </Step>

  <Step title="Watch Work and Graph">
    Use Work for live sessions and Graph for branch relationships and merge risk.
  </Step>

  <Step title="Review independently">
    Inspect each diff, run tests, and open PRs separately.
  </Step>
</Steps>

## Good task splits

A clean split has slices that touch different files and can be reviewed on their own.

| Goal                      | Better split                                                           |
| ------------------------- | ---------------------------------------------------------------------- |
| "Improve onboarding"      | Copy fixes, provider validation, first-run UI, tests.                  |
| "Fix checkout bugs"       | Repro the failing case, patch backend, patch UI, add regression tests. |
| "Ship mobile sync polish" | Desktop status, iOS display, reconnect behavior, docs.                 |

## Watch for collisions

Parallel agents stay safe as long as their work doesn't overlap. Most collisions come from scope creep, not from the tool.

* Don't send two agents into the same lane for unrelated work.
* Avoid broad prompts that invite repo-wide edits — keep each agent narrow.
* Use [child lanes](/lanes/stacks) when one task genuinely depends on another, rather than racing them.
* Merge parent work before rebasing children when possible.
* Use History to see exactly what each session changed.

## Grid vs. separate lanes

Both run agents in parallel, but they answer different questions.

<CardGroup cols={2}>
  <Card title="Grid view" icon="grid-2" href="/chat/grid">
    Same task, several models — race a narrow, well-specified change and keep the best diff. Each tile is a full chat.
  </Card>

  <Card title="Separate lanes" icon="code-branch" href="/lanes/overview">
    Different tasks — give each its own worktree so broad, multi-step work never competes for the same files.
  </Card>
</CardGroup>

<Frame caption="Grid view tiles several agents side by side — best for comparing attempts at one task.">
  <img src="https://mintcdn.com/ade-ac1c6011-dependabot-github-actions-actions-cache-6/mZiHD0-x8whDsXL3/media/demos/grid-view.gif?s=981c83e4715ad7847807a6f9e0d83e43" alt="Grid view with multiple agents running at once" width="620" height="342" data-path="media/demos/grid-view.gif" />
</Frame>

<Tip>
  Use the grid for narrow, well-specified work where comparing a few attempts is cheap. For broad, multi-step features, give each agent its own lane instead.
</Tip>

<CardGroup cols={2}>
  <Card title="Grid & multi-model" icon="grid-2" href="/chat/grid">
    Run several agents at once and compare side by side.
  </Card>

  <Card title="Lanes overview" icon="code-branch" href="/lanes/overview">
    Isolate each task in its own worktree.
  </Card>
</CardGroup>
