# Three Agents, One Repo: The Coordination Problem Nobody Designed For

> Source: <https://dev.to/debashish_ghosal/three-agents-one-repo-the-coordination-problem-nobody-designed-for-4ag3>
> Published: 2026-11-23 07:00:00+00:00

**Recommendation:** Add a shared contract check between agents working the same codepath, plus a claim queue and merge order, before funneling all open tickets to parallel agents.
More in the playbook "Working with AI coding agents": <https://wpnews.pro/playbooks/coding-agents>

One coding agent is a productivity tool. Two agents in the same repository is a sociology experiment. Three is a coordination problem that most teams solve for the first time in production, on a Friday.

The infrastructure conversation covers fleet orchestration and control planes. It skips the boring, decisive question: what happens when two agents touch the same file at the same time, and who resolves what they did to each other?

**The mechanical collision** is the friendly one. Two agents edit the same lines, git refuses to merge, and the failure is loud. Everyone notices. This is the good case, because the system said no.

**The semantic collision** is the dangerous one. Agent A changes the meaning of a function's return value. Agent B, working from the old contract, builds a feature that reads it. The merge is clean. The tests each wrote still pass in isolation. The system now believes two incompatible things, and nothing failed anywhere.

**The duplicate collision** is the expensive one. Two agents, given overlapping tickets, build the same feature twice with different names. Both PRs look competent. One of them is pure waste, and until someone notices, both are load.

None of these are exotic. They are the exact failure modes human teams have, at a speed that breaks the human mechanisms we built to catch them.

Human teams coordinate through standups, hallway conversations, and ownership maps. "I'm touching the auth module, don't start there." It is informal, inefficient, and it works.

Agents attend no standup. They hold no grudges, share no memory, and read no hallway. The coordination layer has to become explicit, which means it has to become infrastructure:

**A claim queue.** Work is assigned or claimed, and a claim is visible. No two agents start the same ticket because the ticket said who started it. This is a work queue, not a scheduler, and it can be a spreadsheet before it is a platform.

**An ownership map.** Which files, modules, and decisions belong to which stream of work. Agents respect boundaries they are told about. They cannot respect boundaries nobody wrote down.

**A merge gate between agents.** Agent PRs that touch adjacent areas wait for the earlier one to land. Serializing the hot paths costs throughput and buys correctness, which is a trade humans already make every day.

**A human integration owner.** When agent PRs collide, a person who owns the integration decides. Not because humans are faster. Because someone has to be accountable for the seam, and accountability does not delegate to a process.

💡 **Pro-tip:** the semantic collision is the one to design against first. The mechanical one announces itself. The semantic one ships clean, passes its own tests, and gets discovered by a customer. A shared contract check between agents working in the same area is worth more than any lock.

Two or three agents on one repo is not a fleet, and the interesting failures will not always reproduce on demand. Solo developers with a single agent can skip all of this. The problem arrives the first time someone parallelizes "funnel all the open tickets to the agents" without anyone asking which tickets share a codepath.

There is also a real risk of over-engineering: most teams need a claim queue and a merge order, not a control plane, on day one.

But the direction of travel is obvious. The team now includes non-human contributors, and every org-design problem humans ever had, multiplied by speed and stripped of social instinct, is coming to a repository near you.

How many agents touch your repo before the first collision, and who resolved it? Was it loud, or was it clean?

**References**
