Guide

Parallel workers without chaos: one task, one worktree, one pull request

Parallel work saves time, and every extra worker adds merge conflicts, tokens and review load. My coordinator keeps at most four tasks in flight. Two tasks run together only when they share no files and neither waits on the other.

30 Nov 2026 · 5 min read
Collage on blue: two runners race at the same time in separate lanes, each lane with its own desk and laptop, tagged Worker A and Worker B; a coordinator with a checkered flag lets one through the finish at a time. Big word PARALLEL and the title.Collage on blue: two runners race at the same time in separate lanes, each lane with its own desk and laptop, tagged Worker A and Worker B; a coordinator with a checkered flag lets one through the finish at a time. Big word PARALLEL and the title.

Why run workers in parallel

Time is the reason. Two tasks that do not depend on each other take about as long as one, if they run side by side. Orca describes its core idea in one line: "Hand a big task to one agent. It splits the work, starts worker agents in their own workspaces, and brings their results back to you" (Orca on GitHub). My setup is that idea plus rules. Each worker gets its own worktree, so two agents never write into the same working folder. They can still change the same file on two branches, and the rules below are there for that.

Why not too many at once

Each extra worker costs three things. The first is merge conflicts. Two branches that edit the same file collide when the second one merges. The Codex docs say the same about parallel code edits: "agents editing code at once can create conflicts and increase coordination overhead" (Codex subagents).

The second is tokens. Anthropic reports that agents use about 4 times the tokens of a chat, and multi-agent systems about 15 times (Anthropic, how we built our multi-agent research system). The same article says that most coding tasks involve fewer truly parallelizable parts than research does. Many coding tasks are a chain, not a fan.

The third is review load. Each pull request needs a reviewer from another provider, a green check on its head and a merge decision. Every open pull request is one more review in the queue, and every fix round adds to it.

The cap: four tasks in flight

The coordinator keeps at most four tasks in flight. A task is in flight from its start until its pull request merges or is dropped. The rest wait in a queue. The number four is my own cap, not a figure from a study. Each task in flight needs a worker, a review and a merge, so the cap keeps that queue short enough to finish.

What makes two tasks safe to run together

Two tasks run together only when both conditions hold. They touch no file that the other touches, and neither depends on the other: the second starts only after the first is merged. The coordinator checks both before it starts a worker. The worker does not check this itself. It touches nothing outside its own worktree, so it cannot see what the other tasks change.

Each task gets one contract, one branch, one worktree and one pull request.

What waits, and how merges happen

The steps in order, with the owner of each step:

1. You: set the goal, as a Linear issue or a chat request.

2. Coordinator: splits the goal into tasks, writes a contract for each one, and orders the dependencies between them.

3. Coordinator: starts A and B together. Neither has an open dependency, and they share no file.

4. Worker: A and B each write the code on their own branch, touch nothing outside their worktree, and open one pull request.

5. Coordinator: starts C when A is merged. It does not wait for B.

6. Coordinator: starts D when B is merged, because D depends on B.

7. Worker: runs the check command on its final head until it is green.

8. Reviewer: reads that pull request and gives one verdict. It edits nothing.

9. Coordinator: merges one pull request at a time, through the gate. Before each merge it re-reads the head and the target branch.

10. Coordinator: a task whose dependency is not merged yet, or whose files overlap a task in flight, waits in the queue. It starts when both conditions clear.

Task A and task B run at the same time

Goal from you, split into tasks by the coordinator
Start now: no shared files, no dependency
WorkerTask A

Own worktree, branch and pull request

WorkerTask B

Own worktree, branch and pull request

WorkerTask C

Starts when A is merged, not when B is

WorkerTask D

Starts when B is merged

WorkerTask A

Own worktree, branch and pull request

CoordinatorMerges A

Through the gate, one pull request at a time

WorkerTask C

Starts when A is merged, not when B is

WorkerTask B

Own worktree, branch and pull request

CoordinatorMerges B

Through the gate, one pull request at a time

WorkerTask D

Starts when B is merged

Start / endStepGroupWorker
At most four tasks run at once. C waits only for A, and D only for B. There is no shared gate for unrelated tasks.

Dependent tasks sit in the queue. A task waits for the merge it depends on, not for the whole group to finish. That is the difference between a queue and a schedule.

Merges happen one at a time, because each merge moves the target branch. The next pull request may then need a new check on the merge result. The coordinator's rule: if the target moved, it runs the check on the merge result with the current target, and merges only when that check is green and the target has not moved again. After three failed attempts, it asks me.

Common mistakes

Each row is a way parallel work goes wrong. The right column is what my coordinator does instead.

MistakeWhat goes wrongWhat my coordinator does instead
Two tasks that edit the same fileThe second branch conflicts when it merges, and the fix lands on top of a moved targetThe second task waits until the first is merged, then starts from the updated base
A task that starts before its dependency mergesThe worker builds on code that may still change, and the review finds the gap lateThe task waits in the queue until the dependency is merged
Too many tasks in flightReviews pile up, and token use grows with each agentAt most four tasks in flight, the rest in the queue
A worker that edits outside its worktreeIt changes files another task owns, and that task's branch breaksA worker touches nothing outside its worktree. A finding outside its scope becomes a follow-up task
Two pull requests merged at the same timeEach merge moves the target, so a green check on the old base says littleOne merge at a time. Before each one, the head and the target are re-read, and a moved target gets a new check

The coordinator's checklist

These are checks my coordinator runs itself. They describe how my workflow works. They are not steps for you to run.

Where these rules come from

Our roles live in a private repository, so I describe them in words instead of linking them. In short:

  • The coordinator starts each worker in its own worktree and keeps at most four tasks in flight.
  • A task starts when its dependencies are merged and it touches no file that another task in flight touches.
  • A worker touches nothing outside its own worktree, and it opens one branch and one pull request.
  • The coordinator merges one pull request at a time, and only through the gate.

The outside evidence is narrower than my practice. Anthropic says most coding tasks have fewer parallel parts than research does, and OpenAI warns that parallel code edits conflict. Neither tests a coordinator that merges one pull request at a time. So the cap of four and the queue rule are my own choices, not results from a study.