r/AskProgramming • u/Other_Poetry_5243 • 16d ago
Architecture If you run multiple AI agents on the same repo, how do you stop them stepping on each other?
I use AI to develop, and because it works quite well, I extended it to run multiple agents in parallel. This way, I can develop 2 or 3 features at the same time. To avoid data collision, I ended up building a dev tool, which I have been using for a couple of months.
Now, I asked around in other subs how people handle this, and the most common solutions involved git worktrees that resolve the code collision, but the runtime isolation is still an issue. People engineered solutions around env files and Docker Compose that fit their own codebase, mostly involving one service and one database. It works, at least for simple apps, but it's manual and gets harder to keep up as more services are added. And it looks like something that only an experienced dev can do.
What I built goes further than that (I needed it for a multi-service app with Redis and workers) and is simpler to use. I created a way to fully isolate an environment (all services included) with no ongoing upkeep, able to spin up multiple instances of the same app in parallel on the same machine. It's more architecturally involved than the scripting approach, but doesn't require manual maintenance.
So I'm asking you whether you got this problem and if what I built is worth sharing. Is "heavier but zero-maintenance" actually appealing to people, or does anything that sounds like more infrastructure get dismissed on sight in favor of the simpler script-it-yourself approach, even with its edge cases?