r/VibeCodeDevs • • 15d ago

I wanted my coding agents to stop working like they were the only ones in the repo

I've been working on a project called AgentSCM with a couple others, and figured I'd share what we've been building.

One thing that's always annoyed us about running multiple coding agents is that they have no idea what the others are doing.

You can have Claude Code working on one thing, Codex working on something completely different, and somehow they both end up editing the same files. Neither knows what the other is doing until something breaks or you have to sort out the mess yourself.

So we've been working on a way to get them to actually coordinate.

AgentSCM is basically a lightweight local hub that lets agents know what the others are working on.

For example, if Codex tries to edit a file Claude is already working on, AgentSCM can block the edit and tell Codex who's working on it and why. Codex can then narrow its changes and retry instead of just doing whatever it was going to do.

We also built in handling for upstream changes. If a PR gets merged that affects files an agent is working on, it gets flagged so the agent knows it needs to rebase.

One of the more interesting parts, at least to me, is that we're using native lifecycle hooks instead of relying entirely on MCP. MCP works fine when the agent remembers to call the tool, but that's kind of the problem. You can't really depend on an LLM to remember to coordinate every time it makes a change.

Hooks let us catch those edits directly, although how much we can enforce depends on the coding tool. Some support blocking edits before they happen, while others are limited to notifications or advisory prompts.

There's also a local history of prompts, diffs, and checks, so you can actually figure out what an agent did without digging through old conversations trying to piece everything together.

We made a little demo that simulates three agents working in the same repo if anyone wants to see how it works:

npx agentscm demo

Doesn't modify any files, so you can run it in pretty much any Git repo.

It's still early alpha, and there are definitely things we're working through. Mac and Linux have the most complete support right now, with Windows being a bit more limited.

Anyway, figured some of you running multiple agents might find this interesting. I'm also curious how everyone else is handling coordination between agents, because up until now I've mostly seen people managing it themselves or just keeping agents in separate worktrees.

https://github.com/agentscm/agentscm | agentscm.dev

2 Upvotes

5 comments sorted by

•

u/endofthread-bot 15d ago

Hey u/brandonfla, thanks for posting in r/VibeCodeDevs! Join our Discord: https://discord.gg/t7SD4ThKuE

• This community is designed to be open and creator‑friendly, with minimal restrictions on promotion and self‑promotion as long as you add value and don’t spam.
• Please follow the subreddit rules so we can keep things as relaxed and free as possible for everyone. • Please make sure you’ve read the subreddit rules in the sidebar before posting or commenting.
• For better feedback, include your tech stack, experience level, and what kind of help or feedback you’re looking for.
• Be respectful, constructive, and helpful to other members.

If your post was removed (either automatically or by a mod) and you believe it was a mistake, please contact the mod team. We will review it and, when appropriate, approve it within 24 hours.

I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.

→ More replies (1)

1

u/kyrax80 15d ago

Worktrees my friend. I made a program where you create a new task, each task creates a worktree. Then you can also set in which port each worktree will run the projects and even create the needed docker docker containers automatically. With these I can do like 3 features or more at once

1

u/brandonfla 15d ago

Ya, we give every agent its own worktree too, so they never trip over each other’s checkout. The trouble is that Claude in one worktree and Codex in another can both be halfway through rewriting the same file, and nobody knows until the second branch hits a merge conflict. AgentSCM keeps a shared record of which agent is editing which files across all the worktrees. When the second agent goes to touch that file, it’s told who already has it and what they’re working on.

2

u/bradanderson 15d ago

worktrees still have code that collides at merge time in your PRs. This tool helps even your worktrees avoid merge conflicts.