A team runs two agents in parallel to refactor a large service. Agent A is assigned to the authentication module and Agent B is assigned to the API routing module. Both agents are working on the same feature branch. After their changes are committed, the team discovers merge conflicts in src/api/auth.ts because both agents modified the same file. What configuration change would have prevented these conflicts?
Select an answer to reveal the explanation.
Short Explanation and Infographic
Two workers, same file, same time — of course it conflicts. The fix is isolation: give each agent its own branch and explicitly define which files each agent owns. Like assigning electricians and plumbers to different rooms in a house, the key is non-overlapping scope so no two agents ever touch the same file at the same time.
Full explanation below image
Full Explanation
Parallel agent conflicts arise when two agents operating concurrently have overlapping write access to the same files. The solution is agent isolation through two complementary mechanisms:
1. Branch isolation: Each agent works on its own dedicated branch (e.g., agent/auth-refactor and agent/api-routing-refactor) rather than sharing a single feature branch. This prevents direct write conflicts and allows each agent's changes to be reviewed and merged independently.
2. File ownership boundaries: The orchestrator explicitly defines which files each agent may modify. In this case, Agent A should be scoped to authentication-related files and Agent B to routing-related files. src/api/auth.ts sits at the boundary of both concerns — this overlap must be explicitly resolved by assigning ownership to exactly one agent before work begins.
Why the other options fail: - Option A (synchronization lock at commit time) prevents simultaneous commits but doesn't prevent both agents from independently modifying the same file and then producing a conflict when they each try to commit. The conflict exists in the file content, not just in the commit timing. - Option C (sequential execution) eliminates the conflict but also eliminates the performance benefit of parallel execution. If the work can be properly isolated, parallel execution is both safe and faster — sequential is a fallback, not a solution. - Option D (same GitHub token) changes commit attribution but has no effect on file conflicts. Conflicts are caused by overlapping file edits, not by which token performs the commits. Shared tokens also eliminate accountability for which agent made which change.
Agent isolation via branch scoping and explicit file ownership boundaries is the correct architectural solution for preventing parallel agent conflicts.