AIFeed

Don't Over-Engineer It: AI Coding Agents Write Too Much Code, and a Short Prompt Reduces It

Summary

arXiv:2612.04613v1 Announce Type: cross Abstract: AI coding agents routinely produce correct solutions that include far more code than necessary, adding unrequested tests, documentation, refactoring and error handling beyond what the task requires. We formalize this phenomenon as over-engineering and introduce the Over-Engineering Score (OES), a family of metrics comparing the size and location of an agent's patch with the reference solution. Analyzing 6,790 agent--task pairs from 14 public agents on SWE-bench Verified, we find that over-engineering is pervasive (median OES between 0.67 and 8.20$\times$ the reference size, depending on the agent) and that a "Goldilocks zone" of 1--1.5$\times$ the reference has the highest resolution rate (59.6% vs. 34.8% for patches above 10$\times$), an association that persists under difficulty controls. A short system-prompt constraint that tells the agent to make the minimal change and not to add tests, documentation, type annotations, error handli…

Original text(via arXiv cs.CL)

Computer Science > Software Engineering

Title:Don't Over-Engineer It: AI Coding Agents Write Too Much Code, and a Short Prompt Reduces It

Abstract:AI coding agents routinely produce correct solutions that include far more code than necessary, adding unrequested tests, documentation, refactoring and error handling beyond what the task requires. We formalize this phenomenon as over-engineering and introduce the Over-Engineering Score (OES), a family of metrics comparing the size and location of an agent's patch with the reference solution. Analyzing 6,790 agent--task pairs from 14 public agents on SWE-bench Verified, we find that over-engineering is pervasive (median OES between 0.67 and 8.20$\times$ the reference size, depending on the agent) and that a "Goldilocks zone" of 1--1.5$\times$ the reference has the highest resolution rate (59.6% vs. 34.8% for patches above 10$\times$), an association that persists under difficulty controls. A short system-prompt constraint that tells the agent to make the minimal change and not to add tests, documentation, type annotations, error handling or refactoring unless asked reduces mean OES by 40% across 14 models from 7 providers (13 of 14 models; median per-model reduction 43%), mostly by stopping edits to files the reference fix does not touch. Much of what it removes is unrequested test code: excluding test files, the reduction is 14%. It also cuts input tokens per task for 13 of 14 models, by up to 42%, and mean OES also falls for every model on SWE-bench Multilingual and Pro. Resolution does not change significantly in aggregate on any benchmark, and per-model effects go both ways.
Comments:Accepted at the AAAI-27 Workshop on Agentic Software Engineering (AgenticSE). OpenReview: this https URL . 13 pages, 1 figure, 17 tables
Subjects:Software Engineering (cs.SE) ; Artificial Intelligence (cs.AI); Computation and Language (cs.CL)
Cite as:arXiv:2612.04613 [cs.SE]
(or arXiv:2612.04613v1 [cs.SE] for this version)
https://doi.org/10.48550/arXiv.2612.04613 arXiv-issued DOI via DataCite (pending registration)

Submission history

Access Paper:

  • HTML (experimental)

Additional Features

  • Audio Summary

Current browse context:

References & Citations

  • Google Scholar
  • Semantic Scholar

BibTeX formatted citation

Bookmark

Bibliographic and Citation Tools

Code, Data and Media Associated with this Article

Demos

Recommenders and Search Tools

arXivLabs: experimental projects with community collaborators

arXivLabs is a framework that allows collaborators to develop and share new arXiv features directly on our website.

Both individuals and organizations that work with arXivLabs have embraced and accepted our values of openness, community, excellence, and user data privacy. arXiv is committed to these values and only works with partners that adhere to them.

Have an idea for a project that will add value for arXiv's community? Learn more about arXivLabs.

The text above was extracted automatically from the source page and may miss images, tables or code blocks. The original is authoritative.

Published by arXiv cs.CL
This site only summarises and aggregates; copyright stays with the original author. Headlines and summaries follow the source — where they differ, the original wins.
Read the original ↗