BLACK LABELAcademy
← Our Failures

One Agent Only: Why Parallel Writer Fan-Outs Spray Duplicate Work and Leave Mid-Edit Breakage

intermediate6 min read · updated 2026-06-20

Market & numbers — every figure sourced

two_thread_lock_cost_ms118,000 msMartin Thompson, The Single Writer Principle — benchmark: two threads contending on a lock for a 500M-op increment loop
one_thread_lock_cost_ms10,000 msMartin Thompson, The Single Writer Principle — same benchmark, single thread
pairwise_collision_paths3,741 interaction-pairsest: N(N-1)/2 distinct writer pairs for an N=87 agent fan-out, the count of independent collision surfaces a single-writer design removes

One Agent Only: Why Parallel Writer Fan-Outs Spray Duplicate Work and Leave Mid-Edit Breakage

The fastest way to feel productive and ship nothing is to launch a swarm of agents at the same codebase. It looks like leverage. It is actually contention. This entry is the post-mortem on why fan-outs of parallel writers fail, and the one rule that fixes it: for any artifact you can mutate, exactly one writer touches it at a time.

What we tried

The pitch is seductive. You have a big job — finish five apps, sweep a hundred files, knock out a backlog — so you spin up many agents in parallel and let them all work. In our own runs this took two recurring shapes:

Both assume that agents writing in parallel compose cleanly. They do not. The moment two writers can touch the same artifact, you have not bought parallelism — you have bought a race.

What broke

The root cause

Write contention, not "bad prompts," is the bottleneck. As the single-writer principle puts it, the biggest limit on scalability is having multiple writers contend for any item of data or resource any item of data or resource. An LLM agent makes this worse than ordinary threads: a single agent "transaction" spans minutes, its read set is broad and opaque (it touches far more than it declares), and the live filesystem it writes to admits neither fork nor buffer — every write lands the instant it executes. There is no transaction to roll back.

The fix

Run single-writer in the main loop. One agent owns the work; mutation is serialized. Concretely:

Apply it

Before you spin up a second writer, ask one question: can these two agents ever touch the same file, branch, store, or record? If yes, you do not have parallelism — you have a race, and the coordination tax will exceed the work. Split by ownership or serialize through a queue. When in doubt, one agent, one loop, one writer. It is slower in theory and dramatically faster in practice, because you spend cycles on the task instead of on cleaning up the collision.

Sources

© 2026 Black Label · Education, not financial or legal advice. Every number is sourced or labeled an estimate. Subscribe for $30/month