Cross-agent verification: use a second AI model to review diffs before merging
umeshonai · x · 2026-10-20
A practitioner shares an operational "Cross-Agent Verification Protocol" for having one AI model review another's work before a PR:
- Write the unified git diff to .context/candidate.patch.
- Run a non-interactive, sandboxed, read-only review pass with a secondary model (e.g. codex exec), instructing it to review the patch against AGENTS.md and output ONLY findings grounded in exact file:line anchors as JSON — or [] if no bugs exist.
- Reject the merge if reviewer output is empty, times out, or lacks file:line anchors.
- Ignore stylistic suggestions; apply minimal patches only for verified logic/security defects, re-run the local test suite, then delete the temp patch file.
The author claims this catches bugs 99% of the time and can be reversed (e.g. Claude reviewing OpenAI's work). The key idea: a machine-checkable second-opinion gate with structured output and fail-closed rules.
Related event: Cross-Agent Verification Protocol Lets AI Models Review Each Other's Code(2 posts)→
More from coding & agent
- Measuring Agent Skills With Evals: How to Tell if an Instruction File Actually Helps — blaizedsouza · 2026-10-20
- Minos: premeasured experimental worlds for studying how AI agents do science — rbhar90 · 2026-10-20
- Anthropic engineer publishes the full prompts behind a dozen Opus 5.5 code-made films — EricBuess · 2026-10-20
- uv author explains: env markers as decision diagrams, minimal equivalent DNF is computationally hard — charliermarsh · 2026-10-20
- uv's scaling pain: complex resolutions explode the intermediate DNF, clause comparison gets expensive — charliermarsh · 2026-10-20
- Yeufonic: open-source frontend for YuE2/ComfyUI aimed at musicians, with local LoRA training — AcrobaticMaize2408 · 2026-10-20