CodeHealth Predicts the Token Cost of Agentic Code Review: A Pre-Registered Study of 465 Agent-Authored Pull Requests
On the map: LLM agents and tool use → Software engineering coding agents
Abstract (arXiv)
Context: Organizations increasingly delegate code review to multi-agent large language model (LLM) pipelines billed per token. Low code quality raises human maintenance effort, but its effect on agent review cost has not been measured. Objective: We test whether baseline CodeHealth predicts the token cost of agentic review and fix beyond pull request (PR) footprint. Method: In a pre-registered observational study, we sampled 465 agent-authored PRs from 246 repositories in AIDev, jointly stratified by CodeHealth and footprint under repository caps. A frozen five-agent review-and-fix pipeline processed every PR with three different LLMs. Per LLM, we fitted a mixed model of log tokens on CodeHealth and log PR footprint, with a repository random intercept. Results: For all three LLMs the CodeHealth coefficient was negative, with 95% CI excluding zero; each CodeHealth point was associated with 3.5% to 6.1% lower token cost. CodeHealth was unrelated to PR footprint, so PR size does not explain the association. Two of three registered smells predicted fix cost; batch fixing left median CodeHealth unchanged. Exploratory analyses located the association in the review stage, where agents iterated more on unhealthy code without writing more comments. Adjusting for the size of the scored files absorbed the association, which we interpret as mediation by file size. Conclusions: A quality metric calibrated against human maintainability also predicts the inference cost of multi-agent review and fix. The effect is modest per point and not carried by PR size, so the refactoring case extends to agent-reviewed code when it changes structure and file size, not only the score. Data Availability: https://doi.org/10.5281/zenodo.22127920
Key facts. Cited by 1 paper in the map (data through 24 Nov 2026). Placed in Software engineering coding agents, one of 16 directions in LLM agents and tool use. Builds on 20 of its 59 references that are in the map. Submitted 15 Oct 2026.
Builds on
20 of 59 references.
Closest ancestors · 6
Same direction, newest first
- 2026Using Agentic AI for contextualized and multifaceted code review at Ericsson14 Sep
- 2026Code Health in LLM-Based Test Generation: Effectiveness and Token Efficiency19 Aug
- 2026Triage: Routing Software Engineering Tasks to Cost-Effective LLM Tiers via Code Quality Signals8 Apr
- 2026AIDev: Studying AI Coding Agents on GitHub9 Feb
- 2026Code for Machines, Not Just Humans: Quantifying AI-Friendliness with Code Health Metrics5 Jan
- 2023ChatDev: Communicative Agents for Software Development16 Jul
Other references · 14
- 2024SWE-Bench+: Enhanced Coding Benchmark for LLMscited by 119
- 2022Using Pre-Trained Models to Boost Code Review Automationcited by 67
- 2025Guidelines for Empirical Studies in Software Engineering involving Large Language Modelscited by 31
- 2025BitsAI-CR: Automated Code Review via LLM in Practicecited by 24
- 2024Concerned with Data Contamination? Assessing Countermeasures in Code Language Modelcited by 18
- 2025United Minds or Isolated Agents? Exploring Coordination of LLMs under Cognitive Load Theorycited by 12
- 2026From Technical Debt to Cognitive and Intent Debt: Rethinking Software Health in the Age of AIcited by 9
- 2022Mining Code Review Data to Understand Waiting Times Between Acceptance and Merging: An Empirical Analysiscited by 5
- 2024A Roadmap on Modern Code Review: Challenges and Opportunitiescited by 5
- 2026AI Writes Faster Than Humans Can Review: A Longitudinal Study of an Enterprise 2x Mandatecited by 3
- 2024Increasing, not Diminishing: Investigating the Returns of Highly Maintainable Codecited by 2
- 2025Code Review as Decision-Making -- Building a Cognitive Model from the Questions Asked During Code Reviewcited by 2
Built on by
Citing papers per year: 2026: 1.
1 paper.
Similar, not cited
Close in wording, no citation either way
- 2026Not All Agents Are Equal: Code Quality and Post-Merge Maintenance Across Five Autonomous Coding Agents in the Wild
- 2026More Code, Less Reuse: Investigating Code Quality and Reviewer Sentiment towards AI-generated Pull Requests
- 2026From Industry Claims to Empirical Reality: An Empirical Study of Code Review Agents in Pull Requests
- 2025On the Use of Agentic Coding: An Empirical Study of Pull Requests on GitHub
- 2026Early Adoption of Agentic Coding Tools by GitHub Projects
- 2026Beyond Bug Fixes: An Empirical Investigation of Post-Merge Code Quality Issues in Agent-Generated Pull Requests
- 2026Predicting Acceptance and Review Effort in Human and Agent Pull Requests
- 2026AI-to-AI Code Reviews of GitHub Pull Requests