Example from the repository## A) dois agentes no MESMO checkout
B gravou
A gravou
versao = 1
nome = treino
cor = verde
## B) um worktree para cada agente
B gravou
A gravou
Auto-merging config.txt
versao = 2
nome = treino
cor = verde
3
In A, both said "gravou", but only one of the two changes survived: A read the file before B wrote and, since it thinks longer, wrote over it, and version 2 disappeared. In B, both changes made it in.
The different waits (A 2 s, B 1 s) fix the order so the rehearsal always gives the same result (18 of 18 rounds identical on 10/19/2026). With equal waits, whoever writes last changes from round to round, but you never end up with both changes.
Two worktrees changing the SAME line (cor roxo × cor preto), captured in the same repository:
Auto-merging config.txt
CONFLICT (content): Merge conflict in config.txt
Automatic merge failed; fix conflicts and then commit the result.
saída: 1
In a single checkout, this would be a silent loss. Here git stops and shows it. The one who resolves it is the orchestrator (or you), not one of the two agents.