Skip to content

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.

  • The GitHub App 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.
  • For the local route: the Nori CLI.
  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 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”.

Turn on automatic worktrees in ~/.nori/cli/config.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, and multiple sessions for running several sessions in one terminal.

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

@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.

  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.

this page as markdown: /sessions/recipes/run-coding-agents-in-parallel.md· index for agents: /llms.txt