Lock at the right granularity
Protect mutable surfaces using leases, file locks, or symbol-level ownership.
Trade-off: Fine-grained locks can reduce collisions but increase contention.
How do agents manage overlapping ownership, interfaces, and mutable state?
Parallel execution is easy to imagine until multiple workers need to change overlapping files, symbols, or contracts at the same time.
Protect mutable surfaces using leases, file locks, or symbol-level ownership.
Trade-off: Fine-grained locks can reduce collisions but increase contention.
Try explicit coordination where agents work in one code environment rather than only separate branches.
Trade-off: Shared checkouts require trustworthy ownership rules.
The comparison: leases prevent collisions, prediction anticipates them, contracts prevent some collisions by design.
WHAT TO WATCHAgent time stalled behind locks or leases.
github.com · Issue #5998
“Multi-worker fleets polling with --claim currently double-fill.”
Reported against bd 1.2.2 four months after #3570 closed, and still open in October 2026. The same kind of failure, but nobody has shown it is the same code path.
cursor.com · Megafiles
“These “megafiles” choke everything. They’re expensive to transport, diff, and merge, and become the site of constant collisions.”
Their answer is structural, not a lock: once a file is flagged, new commits are blocked and an outside agent splits it into smaller modules. In the old run the hottest file collected 7,771 conflicts from 1,173 agents; in the new one the most contested file saw 47.
github.com · Issue #70
“I noticed that when we have multiple agents or multiple Claude Code instances running, that it happens that they work on the same files sometimes resulting in overriding each other's work before changes are saved or committed.”
A first-person report with no trace attached. Closed in July 2025 with a maintainer comment announcing file locking in v2.0.0; no linked PR.
engineering.atspotify.com · Using LLMs in the verification loops
“some agents were a bit too “ambitious”, trying to solve problems that weren’t strictly in their prompt, like refactoring code or disabling flaky tests.”
Scope creep across a fleet of agents. Spotify added an LLM judge that compares each diff with the prompt and blocks changes that go beyond it.
github.com · Issue #3570
“Two workers polling within the same window can both observe the same ready bead, both claim it, and both begin work. Result: duplicated work, near-identical PRs, wasted compute.”
Reported from an overnight Gas Town convoy, and closed the same day. A closed issue doesn't show that every variant of the race is gone.
github.com · Issue #2987
“bd list over the molecule's 50 step beads reported open=50, in_progress=0, closed=0 — zero progress reflected in the cached read.”
A shared database can still give two answers: cached list reads lagged the store by minutes. Open, with the cause suspected but not confirmed.
github.com · Issue #899, Bug Description
“Agents spawned via MCP tools (agent_spawn, mcp__claude-flow__agent_spawn) cannot communicate with each other using daa_communication.”
A spawned agent isn't automatically one other agents can reach. Reported against v2; triage in October 2026 says the subsystem no longer exists in v3.
github.com · Issue #1052
“Both sessions execute the same step. The losing session does not detect that it lost the claim — it had already started before the winning session's claim was persisted.”
An atomic claim isn't enough on its own. A worker must check that it won before it starts. Closed in June 2026.
anthropic.com
“Every agent would hit the same bug, fix that bug, and then overwrite each other's changes. Having 16 agents running didn't help because each was stuck solving the same task.”
youtube.com · Angie Jones · from 14:52
“the agents need to understand where everything lives and what depends on what. So, we built a company world modeled based on the entirety of our 25,000 repo code base”
Alongside it, Block built its own orchestrator, Builder Bot, to coordinate the agents. Quoted from YouTube’s auto-generated captions.
youtube.com · Armin Ronacher or Mario Zechner · from 53:18
“with the pull request it’s even worse now because they come in so quickly, that many of them cannot be merged anyways without manual resolution of the conflict. And there’s a there’s a lack of back pressure mechanism.”
An open-source project’s view of the same flood. The captions don’t label speakers, so who said this is uncertain. Quoted from YouTube’s auto-generated captions.
youtube.com · Mario Zechner · from 54:15
“So basically what we need are bottlenecks. I’m not necessarily I don’t necessarily need human verification or verification that you’re human. I just need a bottleneck that allows me to process the amount of incoming things as a human”
His bottleneck is a first-contribution gate: a maintainer has to vouch for a contributor before their PRs are considered. Quoted from YouTube’s auto-generated captions.
youtube.com · Eric Zakariasson, Cursor · from 27:55
“we were blocked on merging the PR we needed someone else to um to review it for us and maybe they were in a different time zone perhaps. So what we started doing was building this agentic code owner thing”
CODEOWNERS was right about 80% of the time and a bottleneck the rest. The agent approves low-risk PRs. Quoted from YouTube’s auto-generated captions.
cognition.ai
“While I’m optimistic about the long-term possibilities of agents collaborating with one another, it is evident that in 2025, running multiple agents in collaboration only results in fragile systems.”
“Hundreds of workers run concurrently, pushing to the same branch with minimal conflicts.”
Lin's team reached that point only after flat coordination with shared locks failed and they moved to separate planner and worker roles. The fairer contrast is "fragile" against "workable with a planner and worker hierarchy".
github.com · Issue #3178
“Under the repo's own "worktree-per-writer" rule, each worktree (and each Claude Code session with a different cwd) reads and writes a different claims.json, so claims_claim / claims_board / claims_steal do not coordinate the sessions they are meant to coordinate.”
Isolating the code also isolated the coordination. Shown by reading the source, not from an incident where two agents took the same task. The fix, PR #3210, was still unmerged in October 2026.
github.com · Discussion #696
“It has rules in its shared memory, and I keep asking it specifically to check the Claude.md file for the rules before it executes, but it just doesn't.”
Rules written in prose aren't enforced permissions. The reporter couldn't tell whether Ruflo or Claude Code was at fault, and no reply or log followed.
youtube.com · Maggie Appleton, GitHub · from 5:20
“And also coordination debts. This is when you get really hairy merge conflicts because agents will touch in the same files or developers even doing duplicated work because they both picked up a thing and tried to finish it in one day.”
Her other line from the talk: “Agreeing on what to build is the new bottleneck.” Quoted from YouTube’s auto-generated captions.
github.com · Problem Statement, item 1
“Workers can't see each other's beads. A bead created by agent A is invisible to agent B until A's branch merges to main.”
Giving each worker its own branch let them write without contention, but they couldn't coordinate. The design doc moved everything to one shared main with explicit transactions, live since 24 February 2026.
softwareengineeringdaily.com · Transcript, 0:15:01
“There's a JSON file, one line per issue, and it has merge conflicts all the time, and it gets xlerped into the database, and there's a daemon, and it gets stale.”
This describes the early Beads storage, which the move to Dolt replaced. It isn't how Beads works today.
softwareengineeringdaily.com · Transcript, 0:47:57
“It's had stalled workers, runaway workers. I had to kill 320 Claude Code instances on my machine the other day.”
An orchestrator needs to reap processes, cap resources and watch for stalls. This is a first-hand statement, not a measurement.
softwareengineeringdaily.com · Transcript, 0:28:41
“Then one day a swarm took off and fixed all my bugs. I had like 30 Beads all like lined up to knock out. And I couldn't find them, and I panicked.”
The work was done, but the operator couldn't tell. A first-hand anecdote, not a benchmark; the episode doesn't say how many agents ran.
steve-yegge.medium.com · Opening paragraphs
“There were the serial killer sprees, viciously taking out random workers mid-job. (It's always the Deacon, the modern-day Butler in the Gas Town murder mysteries.)”
Supervisor agents can fail too. He presents these as early bugs, fixed before v1.0.
tenzinwangdhen.com · The Bad
“It turned out I had 141 orphaned claude code processes. The polecats were not being nuked correctly, so I needed to manually clean them up.”
He adds that this issue has been fixed since. Cleaning up runs is part of getting them right.
tenzinwangdhen.com · The Ugly
“I experienced this first hand when an agent overwrote a config file entirely. Thankfully it was recoverable via git.”
He kept Beads and worktrees but stopped using Gas Town: "I found it difficult to build a mental model of all of the moving parts."
tenzinwangdhen.com · The Bad
“The mail system (polecat → Mayor status) needed patching when I first used it, and seemed to break down mysteriously.”
He also writes that agents still needed manual prodding, and that when things broke he had to go into the worker sessions directly.
github.com · Issue #3005, Impact
“Real risk of a contributor believing a fix is committed/shipped when their working tree has silently been reverted underneath them, especially if they don't diff before committing.”
With nine MCP processes and five agent worktrees running, a fix reverted twice with no git operation touching the file. The tooling itself became an unexpected writer. The cause is a hypothesis; the issue is still open.
paxos.com
“during incidents, many responders would concurrently send off their own agents. That had a cost: tokens, yes, but more importantly the responders’ attention.”
Duplicate work from humans dispatching agents in parallel. The fix was one agent per incident, in the Slack thread, triggered by a single @triage tag.
datadoghq.com · Prevent recovery behavior from amplifying contention
“For example, 10 agents making 3 attempts each results in 30 executions, even before considering tool-call fan-out. If each attempt triggers multiple APIs or CI jobs, downstream work increases faster than the number of agent runs.”
Retries multiply the load on shared services. Datadog’s answers are retry budgets, bounded concurrency and circuit breakers.
medium.com · Pull quote under the subtitle
“A durable work record is not the same thing as a durable procedure.”
A task that survives a crash in the tracker can still lose the process working on it. She has contributed hundreds of PRs to Gas City and runs it on itself.
medium.com · When a town won’t stay lit
“Because every dispatch reparsed the entire file under a lock, order firing froze. One wedged session claimed the same bead ten times over 5.6 hours.”
About 100 patrol and repair jobs were firing roughly 850 times an hour. The store had grown to 168 MB with 79,210 beads, 96% of them closed.
medium.com · The task survived. The procedure did not.
“It can launch another agent and leave two processes editing the same worktree.”
What a naive retry does after the coordinator dies mid-handoff. She also lists stranded claims, duplicate sessions after retries and stale completions arriving after a newer generation started.
github.com · Capability Brain and Governed Implementation
“Ruflo is the coordination ledger and policy decision point. Claude Code executes code, tests, commands, and file changes. A Ruflo coordination call records work; it does not perform the implementation.”
The project's own answer to the reports of swarms that did nothing. These are policies in a file, not proof they're enforced.
github.com · Concurrent Automated Development
“Never allow two writers in one worktree. Give every writing agent an isolated worktree and explicit file ownership.”
The same section adds: "Only the integration owner edits shared manifests and lockfiles or reconciles overlapping changes."
cursor.com
“Agents would hold locks for too long, or forget to release them entirely. Even when locking worked correctly, it became a bottleneck.”
github.com · Issue #3290, Deep Dive Findings
“calculateRequiredVotes() derives the quorum threshold from state.workers.length, so a single caller could cross any strategy's threshold (raft/bft/quorum alike) by voting under fabricated identities — a Sybil attack on consensus.”
Shown in tests, not by an attacker or by agents colluding. Agent votes only mean something when identity is checked. Fixed by PR #3291; a follow-up (#3338, PR #3339) closed the same gap in sibling operations in October 2026.
github.com · Issue #2028, What happened
“2 of 7 agents aborted before doing any work; 5 completed only because they ignored the brief and worked in "degraded mode" — reading source docs directly and using the shared memory namespace as a bus.”
Part of the cause is which tools Claude Code gives subagents, so not all of it is Ruflo. The fix was a documentation change in 3.7.0-alpha.69.
github.com · Issue #3931, Summary
“nextTask() would therefore hand a finished task to Claude again, which is a new billed turn.”
One word, "complete" instead of "completed", made five finished tasks look pending again. The issue shows the risk of the work running twice, not that it did. Fixed by PR #3932 and released in 3.56.2.
every.to
“When 10 of them finished simultaneously, I had 10 results to evaluate without enough context to know which ones I could trust. AI agents don’t have a speed limit, but the person managing them still does.”
After agent teams and lead-agent orchestration, he moved to specialized folders, each one an agent with its own context, and a dispatch layer that routes work between them.
youtube.com · Lou Bichard, Ona · from 12:28
“GitHub is not a coordination layer for agents. It gets incredibly overwhelming.”
He argues runtime and triggers for agent fleets are solved, and coordination is what’s missing. His proposal is the delivery process as state machines that agents query before moving on. Ona sells a background-agent platform. Quoted from YouTube’s auto-generated captions.
youtube.com · Luke Alvoeiro, Factory · from 9:25
“agents conflict. They step on each other’s changes. They duplicate work. They make inconsistent architectural decisions. And so the coordination overhead ends up eating up the speed gains all the while you’re burning tokens.”
Factory’s Missions run features one after another and parallelize only read-only work, such as research and code review. Quoted from YouTube’s auto-generated captions.
lucumr.pocoo.org
“Each change can be reasonable in isolation but since it’s frictionless, none of us necessarily has to talk to the others or familiarize ourselves with the code we are changing.”
The friction that used to force people to coordinate is gone. In his words, construction can continue after shared understanding has already collapsed.
youtube.com · Ty Smith and Anshu Chada, Uber · from 19:44
“we put a lot of work into the to smart assignments with code inbox so that we try to find the most relevant person to review the code both from a ownership and compliance perspective, but also the history of how that person was working, uh their time zone availability, their calendar availability”
Code Inbox gathers PRs from many background agents into one queue, scores each for risk and blast radius, and tracks review SLOs. Quoted from YouTube’s auto-generated captions.
steve-yegge.medium.com · WARNING DANGER CAUTION
“Some bugs get fixed 2 or 3 times, and someone has to pick the winner. Other fixes get lost. Designs go missing and need to be redone.”
steve-yegge.medium.com · Gas Town 101, Witness
“Sometimes you will need to go hustle the polecats to get their MRs submitted, and then hustle the Refinery to deal with them.”
Even with a patrol role watching the workers, a person still pushes work through.
stevekinney.com
“So partition by ownership before you start any agents. If you can write down who owns what up front, the branches will probably merge cleanly.”