Do Parallel Coding Agents Need One Coordinator?

Date:

You split a big job across three or four coding-agent sessions so it finishes sooner. Each one does good work on its own. Then the trouble starts in the gaps between them: a merge conflict in a file none of them meant to share, an instruction you gave one agent that it never received, a test run that dies for lack of memory because two heavy jobs started at once. Whether to run the agents as equal peers or put one in charge comes down to four checks you can make before you start.

The short answer: Parallel coding agents can run as peers (each works alone and merges its own branch) or under a coordinator (one session holds the plan, takes your decisions, does every merge and approves every production write, while workers do the work). Peers are fine when each agent works in its own files, nothing scarce is shared and the work rarely needs you. Put one coordinator in charge when any of four things is true: the agents edit the same files, they share something scarce (machine memory, a database, a rate-limited service), the work keeps waiting on your decisions, or you can’t confirm that a message between agents arrived. On one repository, most real projects hit at least one.

What goes wrong when parallel coding agents work as peers

The failures don’t show up inside any one agent. Each session passes its own tests and writes a sensible report. They show up where the sessions meet. On one test project (a data pipeline with a production database, run on a 16 GB laptop, with five agent sessions over two days) every one of these happened:

SymptomWhat actually happened
A branch that passed its tests would not mergeAnother agent merged first, and both had edited the same three shared files: a status document, the command reference and the command-line entry point
An instruction “sent” to an agent was never acted onBoth messages queued behind a busy agent’s turn were silently dropped; every message sent to an idle agent arrived
An agent said “merging as soon as the lock clears”Its turn ended there, and nothing was merged until someone asked again
Tests failed with “the paging file is too small”Two memory-heavy jobs ran at once; one at a time, the same tests passed
Production was written from an unmerged branchThe agent had approval in its own chat; nothing broke, but the rule “only merged code touches production” had nobody holding it
One more agent to keep track ofA worker started a worker of its own

None of these is a bug in an agent. Each one is a coordination gap, and the four checks below ask whether your project has it.

Every agent can be right on its own and the project can still be wrong where they meet.

Peers or one coordinator: the four checksAny check that comes back yes is a reason to put one coordinator in charge
1 · Same files?

Changelog, status page, command list, entry point. Yes: the coordinator owns them and merges in order.

2 · Something scarce?

Memory, a database, a rate-limited service. Yes: one queue for the heavy jobs.

3 · Your decisions?

Work that keeps stopping to ask you. Yes: answer in one place, recorded with the date.

4 · Message arrived?

Can't confirm delivery: check the receiver's next commit, resend if missing.

queued is not delivered
Verdict

All four clear: run as peers. Any yes: one coordinator, workers still in parallel.

Check 1: do the agents edit the same files?

Look for files every change touches: a changelog, a status or architecture page, a command list, a routing table, the main entry point of a command-line tool. Peers each add their line, and each branch is correct alone. Whichever merges second hits a conflict, and resolving it needs someone who understands both changes.

Giving each agent its own checkout keeps their uncommitted work apart (a git worktree per parallel agent covers how, and the git worktree reference lists the commands). It does not stop two branches from editing the same lines. If several tasks have to touch the same shared files, give those files to the coordinator: workers leave them alone, and the coordinator updates them as it merges each branch, one at a time.

Check 2: do they share something scarce?

Count what the agents compete for, not just what they edit:

  • Machine memory. On the test project, the document parser needed about 4.5 GB free. On Windows, running short shows up as a “paging file is too small” error, because the page file backs memory that RAM can’t hold. At 2.8 GB free it failed on every page; at 4.3 GB free, with another job running, three of five real-parser tests failed. Run one at a time, all five passed.
  • A database. Two agents writing to the same production tables need an order, a backup before each write and one place that says yes.
  • A rate-limited outside service. Two agents crawling the same host, or spending the same API quota, slow each other down or get both of them blocked with an HTTP 429 Too Many Requests reply.

Running in parallel buys nothing when the jobs queue on the same resource anyway. A coordinator keeps one queue for the heavy jobs and lets the light ones run alongside.

Parallel agents only save time if they don’t queue for the same scarce resource.

Check 3: how often does the work need your decision?

Some work runs for hours untouched. Other work keeps stopping to ask: accept this result, pick an option, approve this write. With peers, each agent asks you in its own chat, and you become the switchboard. The answers end up scattered across conversations, and an agent may act on an answer meant for another.

With a coordinator you answer in one place. It passes each decision to the worker that needs it, quoting your words, and records it in the repository with the date. A decision recorded in the repository survives whichever session took it.

Check 4: can you tell a message arrived?

Agents that talk to each other through a messaging layer depend on delivery. On the test project, a message to an idle agent was delivered at once. A message sent while the agent was mid-turn came back “queued”, and both of those were lost. One was a decision a worker was about to act without. It was caught only because the coordinator read the worker’s next commit, saw the decision missing and sent it again.

So “queued” never means delivered. Check the receiving agent’s transcript or its next commit for the message, and resend it, marked as a resend, if it isn’t there. With peers, nobody does that check. With a coordinator, it is part of the job.

A queued message is a hope, not a delivery; check the receiver’s next commit.

Peers or a coordinator: the decision table

Your projectRun as peersPut one coordinator in charge
Independent units, each in its own files (separate articles, one adapter per data source, batches by customer)Yes: little to collide, tidy up afterwardsOverhead with little gain
Shared files every change touchesConflicts at merge timeYes: the coordinator merges in order
A scarce shared resource (memory, a database, an outside host, a quota)Agents compete and failYes: one queue
Frequent decisions from youYou become the switchboardYes: one place to answer
Steps that depend on each other’s resultsAgents wait on each other blindlyYes: the coordinator orders them

If your project lands in any row on the right, the coordinator usually pays for itself.

What the coordinator does

A coordinator is an ordinary agent session with a narrower job. On the test project, six rules covered it:

  1. It holds the plan and takes your decisions. Workers report to it. It passes each decision on and records it with your words and the date.
  2. It does every merge, one at a time, and runs the full test suite on the merged result before moving the main branch. Workers never merge their own branches.
  3. It approves every production write. Only merged code writes to production, after a backup that has been checked to restore.
  4. It owns the shared files and updates them as it merges, so workers don’t collide in them.
  5. It runs the heavy jobs one at a time and checks free memory before starting one.
  6. It checks, never trusts. A worker’s report is a claim. The coordinator reads the commit, the test output or the row counts before it tells you something is done, and confirms that every message it sent arrived.

Workers still run in parallel on their own steps. Two smaller rules help: workers don’t start workers of their own (they ask the coordinator), and side tasks inside a step (a search, a review, a check) go to short-lived helpers that report back into that step, not to more full sessions you have to follow.

When peers are the better choice

A coordinator costs something: one more session, and a relay step for every decision. When the work splits cleanly (each agent writes its own article, each handles one data source and nothing reaches production until you review it) peers finish sooner and the overhead buys nothing. Tidy up the branches at the end and you’re done.

The other case is a fixed bulk job, the same check run on thousands of items. Use a script that fans the items out to helpers and collects the results (one agent can also supervise another for jobs like this). It doesn’t need a coordinator holding context, because nothing in the job waits on a decision.

The short version

Run parallel coding agents as peers only when they work in separate files, share nothing scarce and rarely need you. Otherwise put one coordinator in charge of the plan, your decisions, the merges, the production writes, the shared files and the queue of heavy jobs, and let the workers do the work. Whichever you choose, treat every agent’s report as a claim to check, and never assume a queued message arrived. Long sessions also degrade on their own, which keeping the context window as a budget addresses.

Frequently Asked Questions

Isn’t a coordinator just a bottleneck?

Only for the things that must happen one at a time anyway: merges, production writes and memory-heavy jobs. Those were already serial; the coordinator just makes the order deliberate. Everything else still runs in parallel in the workers.

Can the workers merge their own branches if the tests pass?

A worker’s tests prove its branch alone. Once another branch has merged, the combination is untested. The coordinator merges each branch into the current main and reruns the full suite on the result, which catches the conflicts and interactions no single worker can see.

What should I do when a message to an agent seems lost?

Search the receiving agent’s transcript for a distinctive phrase from the message, or read its next commit. If it isn’t there, resend it, say it is a resend, and repeat any decision word for word. Where you can, send while the agent is idle rather than mid-turn.

Share post:

Subscribe

Popular

More like this
Related

Can AI CLI Conversation History Leak Answers Into a Blind Test?

You use an AI command-line tool to grade or answer hundreds of questions, one fresh run each. Then you find out it keeps every conversation on disk, answer keys included. Is run 200 quietly reading run 199?

The Code Snippets 403 That Comes From Your Host’s Firewall, Not WordPress

You change a few lines in a snippet, press Save, and get "Could not update snippet. Request failed with status code 403". Press Save on the unchanged snippet and it works. Your login is fine. Something between you and WordPress is reading the code itself.

Why a Flaky Test Passes Alone and Fails When the Machine Is Busy

Run the test by itself and it passes, every time. Run the whole suite in parallel and it fails, but only some days, and its failure looks exactly like a real bug. In our case the code was fine. The test was waiting on a clock.

Why Multisite Subsite Registration Sends Visitors to the Main Site

You put a "create an account" link on one site of a WordPress multisite. Visitors who click it land on the main site, which either says "Registration has been disabled" or signs them up there instead.