Our team of 3 runs a lot of coding agents in parallel on the same repo, often 10+ combined going at once (we love our subagents). Despite our small team size, a big issue we ran into was coordination: two agents editing the same file, one agent running git stash and nuking another's in-progress work, and no way to see what anyone else's agents were doing.
Some collisions happen live in your working tree, but the expensive ones surface at merge time when two agents on different laptops each spent an hour rewriting the same module in different directions, and GitHub tells you about it only once the work is already done. At that point the cheapest fix is usually throwing one side away. It wasn't for lack of talking to each other, either--we'd split up the codebase and call out what we were working on, but agents don't always stay in their lanes. Even with scoped tasks, they would still inevitably wander into a shared helper or refactor something that a teammate's agent was already rewriting. We kept grinding away, untangling conflicts, before we realized that we were solving the wrong problem; the conflicts only exist because every agent codes blind to what the others are doing. Why did we have to keep patching that up at merge time instead of having them write code that fits together in the first place?
So a few months ago, we built Shepherd as an experiment to see how well agents could collaborate. As we've iterated on it, not only has it saved us the time and effort of fixing rewrites/conflicts, but we've actually been seeing cleaner and more robust code from our agents, simply because they're able to see what their fellow agents are working on and communicate to write code that works together.
It's a small hub the agents all connect to (via mcp, so it works with Claude Code, Codex, Cursor, etc) that handles leases/locks on parts of the repo plus a live presence feed of who's working on what. It's self-hostable, open source, on npm (@korso/shepherd).
You can try it out at korsoai.com/shepherd. The one-time setup should be super easy and it should work forever after that with no human input. If you try it and it breaks, tell me and I'll fix it same day.
Also open source here, plus you can read about it here.
I built it so I'm obviously biased, but I want to know how others handle this. Do you just deal with the conflicts? Some convention in your CLAUDE.md?
Thanks for reading and I hope this can save you guys some time; always open to feedback!
Top comments (0)