Adversarial Review: Structured Disagreement for Grounded Agentic Code Review
Organizations: Cornell University · Stanford University
Abstract
Early multi-agent LLM systems often used role-separated teams, yet scaling agent count yields diminishing returns on repository-level coding tasks. Recent alternatives treat agents as passive tools (subagents), yet this removes the benefits of agent interaction entirely. We study whether a subagent paradigm can support a middle ground: minimal agentic cooperation without the overhead of large multi-agent teams. We introduce Adversarial Review (AR), a minimal cooperative code-review protocol in which a main coding agent works with a reviewer and a critic agent. The reviewer evaluates code, while the critic audits the review through structured disagreement before the main agent edits. On LiveCodeBench, AR achieves the highest pass rate among tested methods, outperforming a five-agent baseline while using only three agents. On SWE-PRBench, naive AR exposes a false-consensus failure mode, where agents converge on agreement without sufficient evidence, but a single prompt iteration that adds disagreement explicitly achieves the highest F1 among tested methods. On SWE-bench Verified, AR also shows improvements over the baselines on repository-level coding tasks. Together, AR demonstrates that cooperative code review does not require many agents or complex communication structures: it requires that disagreement be minimal, structured, and evidence-grounded.
Figures & tables
| Method | pass / 105 | pass-on-hard / 57 | # agents |
|---|---|---|---|
| Zero-shot | 77% | 35/57 (61%) | 1 |
| Self-Refine | 77% | 35/57 (61%) | 1 |
| Single-reviewer | 77% | 36/57 (63%) | 2 |
| Two-reviewers | 75% | 34/57 (60%) | 3 |
| MARS | 82% | 39/57 (68%) | 5 |
| AR | 87% | 43/57 (75%) | 3 |
| Method | F1 | N |
|---|---|---|
| AR with text constraint | 0.533 | 100 |
| Two-reviewers | 0.503 | 100 |
| MARS | 0.501 | 100 |
| Single-reviewer | 0.495 | 100 |
| AR | 0.457 | 100 |
| Method | pass-rate (%) | N |
|---|---|---|
| AR | 75.2% | 500 |
| Zero-shot | 71.6% | 500 |
| MARS | 72.6% | 500 |
Automated Code Review
Automated code review uses software analysis and AI to find defects, assess changes, and support pull-request decisions.
See all 45 papers