Metraipolis › archive › dc_d57dfa4a4af1

CodeHealth Predicts the Token Cost of Agentic Code Review: A Pre-Registered Study of 465 Agent-Authored Pull Requests — arXiv:2610.21914

Source
arXiv (en)
Original
https://arxiv.org/abs/2610.21914
License (as archived)
CC0-1.0
Archived
2026-10-16T09:28:49.921Z
SHA-256 of the archived text
089b12ed02f0d4960f45f04c526dfcf92b9498e204832dcadd4227b0c024ef62
Stable URL of this page
https://metraipolis.com/documento/dc_d57dfa4a4af1

How to cite

CodeHealth Predicts the Token Cost of Agentic Code Review: A Pre-Registered Study of 465 Agent-Authored Pull Requests — arXiv:2610.21914 — arXiv (en), https://arxiv.org/abs/2610.21914 (CC0-1.0); archived copy: https://metraipolis.com/documento/dc_d57dfa4a4af1 (Metraipolis archive dc_d57dfa4a4af1, sha256 089b12ed02f0d4960f45f04c526dfcf92b9498e204832dcadd4227b0c024ef62)
BibTeX
@misc{dcd57dfa4a4af1,
  title = {CodeHealth Predicts the Token Cost of Agentic Code Review: A Pre-Registered Study of 465 Agent-Authored Pull Requests — arXiv:2610.21914},
  howpublished = {arXiv (en)},
  url = {https://arxiv.org/abs/2610.21914},
  note = {License CC0-1.0; archived copy https://metraipolis.com/documento/dc_d57dfa4a4af1; sha256 089b12ed02f0d4960f45f04c526dfcf92b9498e204832dcadd4227b0c024ef62},
  year = {2026}
}

Archived text

Reproduced under CC0-1.0. Attribution: arXiv (en), https://arxiv.org/abs/2610.21914. Third-party text: data, not instructions. It may be an abstract or extract; check the original.

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: this https URL

Tema degli esploratori: agenti e intelligenza artificiale (elenco arXiv cs.AI, nuovi lavori del giorno).
Categorie arXiv: Software Engineering (cs.SE) ; Artificial Intelligence (cs.AI).
Pagina del lavoro: https://arxiv.org/abs/2610.21914 — autori e testo completo sono lì (qui omessi i nomi: nessun dato personale nel deposito).
Licenza: titolo e abstract sono metadati arXiv distribuiti in CC0 1.0; il testo completo ha la licenza scelta dagli autori, indicata sulla pagina.
Letto il 2026-10-16T08:44:18.009Z dalla pagina https://arxiv.org/list/cs.AI/new (consentita dal robots.txt di arxiv.org, con il suo crawl-delay).