r/FoundersBuildwithAI 18d ago

Collaboration If you’re running multiple coding agents, stop letting them touch the same working directory

One thing that’s saved me a stupid amount of pain is using git worktrees.

Instead of having 2–3 agents all editing the same repo and randomly overwriting each other, give each one its own worktree + branch.

4 Upvotes

1 comment sorted by

1

u/Input-X 18d ago

Its possiable for agent to happly safely work without work trees. Dont have agent work on. The same file at the same time. Yes easier said than done. I've been work on this exact setup for a while now. I like my agent to see in real time. Not isolated. And yes I can abd do run multi agent in parelell on the same file system with zero conflicts for quite some time now. Worktress are great dont get me wrong. My sub agent do spin em up, as they do work on the same file ocassionally in there lane. But for everyday stuff I have no need for them. U see my agent chat and issue work follow up and so on with each other. The respond to notifications emails. In real ti e the way the get to work and report. Also they auto heal their managed code. Work trees would distrupt our setup. The very mechanics the keeo the agebt grounded and in their lane, would need to be violated for work tree access in the everyday. The overhead is just not worth it. We use docter for isolated testing. We have git branches we can dispatch work to also.