> Index of all Nori docs pages for agents: https://docs.noriagentic.com/llms.txt · Ask a question: https://noriagentic.com/ask

# How to run several coding agents in parallel on the same repo

Give each agent its own copy of the repository and its own branch. In Nori Sessions this is automatic: every conversation runs on its own cloud machine with its own checkout, so agents never edit the same files on disk. Each one pushes a separate branch and opens a separate pull request. On your laptop, the Nori CLI does the same with one Git worktree per session.

## Prerequisites

- The [GitHub App](https://docs.noriagentic.com/sessions/guides/github/) installed, with the repository added under **Settings → Environment**, so every machine starts with it.
- A fleet large enough for the agents you want at once. The default fleet size is 5; later conversations wait in the queue. See [fleet size](https://docs.noriagentic.com/sessions/guides/machines-and-capacity/#fleet-size).
- For the local route: the [Nori CLI](https://docs.noriagentic.com/cli/start/install/).

## Steps

1. Split the work into tasks that touch different parts of the code, such as one per module, endpoint, or test file. Separate machines remove conflicts on disk; separate areas keep the pull requests from conflicting at merge time.

2. Start one conversation per task. Any surface works:

   - **Slack:** one top-level mention per task; each mention starts its own thread and its own session.
   - **Web chat:** one new chat per task.
   - **A project:** create a [project](https://docs.noriagentic.com/sessions/guides/projects/) and use **Work** → **Start a project run** once per task, or let the project assistant delegate with `nori-sessions projects delegate`. The assistant is told when each run finishes.

3. In each prompt, name the branch and the boundary, for example “work on branch `agent/billing-tests`; change only files under `billing/`”.

4. Ask each agent to open a pull request against `main` and to rebase on `main` before it finishes.

5. Review and merge the pull requests one at a time. If a later one conflicts, reply in its thread: “rebase on main and resolve conflicts”.

### On your own machine with the Nori CLI

Turn on automatic worktrees in `~/.nori/cli/config.toml`:

```toml
[tui]
auto_worktree = "automatic"   # "ask" prompts instead; the default is "off"
```

Then start `nori` in the repository once per task, each in its own terminal. Every start creates a Git worktree under `<repo>/.worktrees/`, so each agent edits its own checkout on its own branch. Nori does not delete these worktrees; remove them with `git worktree remove` after merging. See the [`[tui]` config](https://docs.noriagentic.com/cli/reference/config/), and [multiple sessions](https://docs.noriagentic.com/cli/guides/multi-session/) for running several sessions in one terminal.

## Example

Three Slack messages in `#eng`, sent one after another:

```text
@Jiro in the api repo, on branch agent/rate-limit, add per-key rate limiting
to routes under api/public/. Change nothing else. Run the tests, open a PR.

@Jiro in the api repo, on branch agent/billing-tests, raise test coverage of
billing/invoice.ts. Only add or change files under billing/. Open a PR.

@Jiro in the api repo, on branch agent/deps-docs, update docs/setup.md to
match the current package.json scripts. Docs only. Open a PR.
```

Three threads, three machines, three branches, three pull requests.

## Verify it works

1. Open **Settings → Fleet** (admins) to see the machines running now, or send `!fleet-status` in any Slack thread: one machine per running conversation.
2. In GitHub, check that each branch has its own pull request and that each diff stays inside its boundary.
3. Send `!status` in a thread to check one agent without interrupting it.

For capacity and the queue, see [machines, fleet size, and the queue](https://docs.noriagentic.com/sessions/guides/machines-and-capacity/).
