AI Code Reviewers Get Better When They See How Code Was Built
Better AI code review could mean fewer bugs and faster software updates for everyone.
When programmers write code, they usually review the final changes before adding them to a project. But that final version doesn't show all the wrong turns, failed attempts, and tests they ran along the way. A new study asked: can giving AI reviewers that full history help them spot more issues?
The researchers created a dataset from 339 coding tasks completed by AI agents, each with a detailed record of how the code was developed. They then tested different ways of presenting this history to AI reviewers. They found that giving full access to the history raised the average recall—the share of known issues caught—from about 23% to nearly 26%. Simpler presentations of the history also helped, improving recall by 4 to 7 percentage points. The gains were especially noticeable for comments explaining why tests failed.
However, the benefits come at a cost: reviewing with full history requires more tokens (computing power) and takes longer. Also, the improvement wasn't consistent across all setups—only four out of six configurations saw better recall. The study suggests that how you present the history matters; simpler views can be just as effective as full access.
For non-engineers, this means AI code review is getting smarter by looking at the whole story, not just the ending. That could lead to fewer bugs in software you use, and faster development cycles. But it also means more computing resources are needed, which could affect costs. As AI becomes more involved in coding, understanding how to best use its capabilities will be key to building reliable software.
- AI code reviewers can catch more issues when they see the full history of how code was written, not just the final version.
- The improvement is modest—about 3 more percentage points of issues caught—but consistent across different ways of showing the history.
- Using the full history requires more computing power and time, so simpler summaries of the history may be more practical.
Why It Matters
Better AI code review means fewer bugs in software you use, saving time and money on fixes.