# Run tens of agents at once

rev0 runs tens of agents at once on one repo, each on its own branch and worktree. In this tutorial
you start with three, which is enough to see everything that matters: the same steps hold for tens.
One agent stops to ask you a question, which you answer while the others keep
working. Then you merge them in whatever order they finish, and watch an agent resolve the
conflict two of them cause. It takes about 15 minutes.

## What you will have

- Three tickets that ran side by side on `hello-rev0`, each on its own branch and worktree.
- A question answered in one click, while the other agents kept working.
- All three branches merged, including one whose merge conflict an agent resolved for you.

## 1. Get rev0

<div class="get-rev0">
  <img class="get-rev0-logo" src="/icon.svg" alt="" width="56" height="56">
  <span class="get-rev0-kicker">Early access</span>
  <strong class="get-rev0-title">Don't have rev0 yet?</strong>
  <span class="get-rev0-text">Sign in, get on the list, and we email you when your access is ready.</span>
  <a class="get-rev0-button" href="https://account.rev0.codes/sign-in"><span class="get-rev0-small">Free</span><span class="get-rev0-big">Join the waitlist</span></a>
</div>

Once you have access, open the board. This page is all you need from there.

**Result:** you are on the waitlist, or you already have rev0 and can go on.

## 2. Let rev0 make a practice repo

Agents work in a git repository. You do not need one of your own: ask rev0 to make it.

1. Click **Create**. In **Summary** type `Create the practice repo`. In **Description** type
   `Create a new git repository at ~/hello-rev0 with a README.md and one commit, then tell me its full path.`
2. Click **Create** again. The agent does the work and replies with the path.
3. In Settings, General, click **Open board settings**. Under **Repository and new tickets**, paste
   the path into **Default working directory** and click **Save changes**.

**Result:** every new ticket on this board now starts in `hello-rev0`.

## 3. Write three tickets

Each ticket below uses **Auto (agent executes freely)**, the Developer profile's default mode, so
it starts as soon as you create it. Click **Create** for each one, fill in **Summary** and
**Description**, leave the other fields as they are, and click **Create**.

1. **Summary**: `Add a Usage section to the README`
   **Description**: `Append a short "Usage" section at the end of README.md explaining that this repo is only for trying rev0.`
2. **Summary**: `Add a Contributing section to the README`
   **Description**: `Append a short "Contributing" section at the end of README.md saying that agents open every change as a ticket.`
3. **Summary**: `Add a .gitignore`
   **Description**: `Before you write anything, ask me which language this repo will use, offering Python, Node and Go as choices. Then add a .gitignore for it.`

The first two both append to the end of `README.md`, on purpose: that is the conflict you will
watch get resolved.

**Result:** three cards in **To Do**, claimed within seconds. After setup the board runs up to 8
agents at once (**Max concurrent agents** in **Settings > Models & runs > Run limits**), so all three move
to **In Progress** together.

## 4. Watch them work side by side

Open each card in turn. On the **Details** tab, **Worktree** shows three different branches, `agent/ticket-<id>`,
each in its own worktree, shown under **Working directory**.

**Result:** one separate worktree per running ticket, next to your own checkout. Each agent edits its own copy, so none of them sees another's
half-written files, and your checkout stays exactly as you left it.

![The board with tickets spread across its columns, several of them In Progress](../how-to/img/board-overview.png)

## 5. Answer a question

The `.gitignore` agent reads the repo, then asks its question. Its card moves to
**Your turn**, and if you allowed notifications, your devices get one.

1. Click **Your turn** on the board, then the `.gitignore` card.
2. Next to the question, click **Answer**.
3. Click **Python**, then **Send answer**.

![A question from an agent with its choices as buttons](../how-to/img/pending-question.png)

**Result:** the ticket goes back to the agent, which writes a Python `.gitignore`. The other two
agents never stopped: a parked ticket holds nobody else up.

You can also answer from your phone, away from your desk. Setting that up is its own guide:
[Reach the board from your phone](../how-to/phone.md).

## 6. Merge in any order

The tickets finish in whatever order they finish, and each lands in **In Review** with **Merge**
on the bar under its header. Merge them as they arrive:

1. Open the first README ticket to reach **In Review**, click **Merge**, then **Merge** in
   **Merge branch**.
2. Do the same for the `.gitignore` ticket. It touches another file, so it merges cleanly.
3. Now merge the second README ticket the same way.

**Result:** the last merge hits a conflict: both branches appended to the end of `README.md`.
Instead of stopping, the board merges your base branch into the ticket's branch and hands the
conflict to an agent. The card moves back to **In Progress** and **State**, under **Worktree** on
the **Details** tab, reads **Auto-resolving conflict…** while the agent keeps both sections. Once it commits the fix, the
ticket returns to **In Review** and the merge completes.

If an agent cannot resolve a conflict in two tries, the ticket parks for you instead: see
[Resolve a merge conflict](../how-to/review-and-merge.md#resolve-a-merge-conflict).

## 7. Check the result

Open the second README ticket and click its **Changes** tab. `README.md` holds both new sections,
and the `.gitignore` ticket's branch is merged too. Move the three tickets to **Done**.

## You can

- [ ] Run several tickets at once on one repository, each on its own branch and worktree.
- [ ] See each agent's worktree, and know your own checkout stays untouched.
- [ ] Answer an agent's question while the others keep working.
- [ ] Merge tickets in any order.
- [ ] Let an agent resolve a merge conflict, and know where to look if it cannot.

## Next

- [Join the waitlist](https://account.rev0.codes/sign-in) if you do not have rev0 yet.
- [Split big work into subtickets](../how-to/split-work.md) lets an agent do this fan out for you.
- [Answer what the board asks you](../how-to/pending-action.md) covers every reason a ticket parks.
- [Review and merge an agent's work](../how-to/review-and-merge.md) goes deeper into review, checks
  and undoing a merge.
