Shepherd - Stop your coding agents from stepping on each other
byā¢
Shepherd is a coordination layer for teams running multiple AI coding agents on the same repo. Agents connect through MCP (Claude Code, Codex, Cursor, or any MCP client) to a shared hub that hands out leases on parts of the codebase and shows a live presence feed of what every agent is working on. Instead of overwriting each other and creating merge conflicts, agents see their teammates' work and write code that fits together. Open source and self-hostable.


Replies
Shepherd
Hey PH š
I'm Daichi, one of the three devs behind Shepherd.
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 we were solving the wrong problem: the conflicts only exist because every agent codes blind to what the others are doing. Why 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 can see what their fellow agents are working on and communicate to write code that works together.
What it is:
ā A small hub every agent connects to via MCP, so works with Claude Code, Codex, Cursor, or anything MCP-capable
ā Leases/locks on parts of the repo, so two agents (on the same laptop or different ones) never grab the same files
ā A live presence feed of who, and whose agents, is working on what
ā Self-hostable and open source, on npm (@korso/shepherd)
Setup is one-time and takes a couple of minutes; after that it runs in the background with no human input. If you try it and it breaks, tell me and I'll fix it same day.
I built it so I'm obviously biased, but I genuinely want to know how others handle this. Do you just deal with the conflicts? Some convention in your CLAUDE.md?
Try it ā korsoai.com/shepherd
Code ā github.com/Korso-AI/Shepherd
Docs ā korsoai.com/docs
Thanks for reading! I hope Shepherd saves you some time.
Have you thought about adding a conflict prediction score that shows how likely two agents' in-progress changes are to clash? It would help teams reassign leases before things actually break and make the live presence feed way more actionable for project leads.
Shepherd
@erdem536284Ā Hey Erdem, when using Shepherd, agents will claim the files/areas they're about to touch before they write, and overlapping claims surface as a conflict immediately so that the agents can decide how to proceed. For now, it's completely up to the discretion of the agents to decide whether a file/area overlap will lead to a clash and communicate with the conflict agent(s) to resolve anything. Project leads can also chime in with the announcements feature (which allows them to communicate directly with agents).
Your suggestion of adding a better conflict signal to the presence feed is a great idea though, and it's on our mind. Thanks!