A bug-based test finds limits in automated code review
(When) Should a Software Factory be Lights-off? Benchmarking Code Review Agents on Bug Detection · arXiv:2610.13668

In plain words
CRBugBench is a test of whether code review agents can find bugs that people later confirmed and fixed. Instead of checking whether an agent’s comments resemble human comments, it gives the agent the original code change and repository context, without saying a bug is there.
On GitHub tasks involving bugs people caught before the change was merged, claude-opus-5 included the known bug in its first five findings on 79.6% of tasks. The test measures bug detection, not every part of a good review.
The research
If human review comments can miss valid bugs, how can developers tell whether automated reviewers recover defects that people actually confirmed and fixed? A useful test needs to check the defect itself while giving agents the repository and change they would have reviewed.
CRBugBench pairs confirmed bugs with the changes that introduced them, then measures whether review agents recover those bugs in repository tasks.
For each task, an agent reviews the repository snapshot and pull request that introduced a known bug, without being told a bug is present. Three language-model judges label whether its findings match the bug, and the researchers calculate the share of tasks where it appears in the first five.
On GitHub tasks, claude-opus-5 recovered bugs caught before merge more often than bugs found after merge: 79.6% versus 64.2% of tasks. The results show strong but incomplete recovery, with performance differing by track.
These results measure recovery of known bugs on selected repository tasks, not overall review usefulness or performance across all software projects. The adjusted associations describe patterns in the data; they do not show that bug visibility alone causes detection differences.
What the evidence shows
- Test bugs, not comment similarity
CRBugBench is a benchmark that tests whether code review agents recover bugs that people later confirmed and fixed. This targets a problem with judging reviews by how well they match human comments: those comments can omit valid bugs or include less useful feedback.
The benchmark’s score, recall@k, means the share of tasks where the known bug appears among an agent’s first k findings.
- Trace bugs to their source
To build its tasks, the authors collected bugs from addressed review comments and later bug-fix reports, then linked them to the pull requests that introduced them. Agents received the repository snapshot, change, and pull request description without being told a bug existed.
The benchmark contains 1,800 tasks from GitHub and proprietary repositories, so it tests bug recovery in repository context.
- Recovery varied by bug track
On GitHub tasks for bugs caught before merge, claude-opus-5 put the known bug among its first five findings on 79.6% of tasks. For bugs discovered and fixed after merge, it did so on 64.2% of tasks.
The figures describe separate task groups on the public portion; they show that the agent’s bug recovery differed across these tracks, not that it found every defect.
- Context marks a detection gap
An adjusted analysis found that agents were more likely to detect bugs visible in the change than bugs requiring project context, cross-file checks, or runtime checks. Agents also did substantially worse on the evaluated proprietary tasks than on GitHub tasks, which more often contained bugs needing project context.
These patterns help explain why results from public tasks did not transfer evenly, though the repository portions had different task mixes.
- A broader prompt helped some models
The authors tested a prompt that encouraged more comprehensive findings against the default prompt, which emphasized important findings. The broader prompt improved detection for several tested models, especially less-verbose ones, but gains were smaller or absent for claude-opus-5.
The prompt result is therefore model-dependent, while the benchmark’s other analyses show that bugs requiring context remain harder to detect.
Deep
- Original paper authors
- Chenyang Yang, Hao He, Ti-Chung Cheng, Jenna Butler, Emerson Murphy-Hill
- Submitted to arXiv
- License
- CC BY 4.0