Structured merge protocol proposed to prevent 'last agent wins' in concurrent AI coding
When two AI coding agents branch from the same base commit, whichever patch arrives last can silently overwrite the other, making completion timing an unintended factor in repository correctness. A proposed merge protocol addresses this by requiring explicit inputs — including base commit hash, file paths, hunk ownership, required checks, and a diff digest — to bind every review to exact bytes. The protocol processes patches by verifying the digest, comparing changes since the base, rejecting overlapping hunk ownership, attempting a rebase in an isolated worktree, and running all required checks before emitting a result. Critically, the approach prohibits selecting a winner based on task start time, completion time, agent identity, or retry count, treating those as operational metadata rather than merge logic. Where conflicts cannot be resolved automatically — particularly behavioral conflicts spanning multiple files — the protocol surfaces evidence and routes the decision to a human reviewer rather than defaulting to a silent policy.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.
Discussion (0)
Log in to join the discussion and vote.
Log in