The maintenance bill for AI-written code is coming due
Generated code needs more corrective work than human code, benchmarks overstate how good models are at real code, and agents quietly skip the cleanup nobody asks for.
- In a preprint, agent-attributed code in production needs 49.1% corrective modifications, against 37.9% for human-written code. Self-reported m:…0987
- In a preprint, models score 84-89% correctness on synthetic coding tasks but only 24-35% on real-world class-level code. Self-reported m:…0987
- In a preprint, DynaFix cuts token consumption by 60-70% against state-of-the-art repair methods and beats ReinFix by 15.6-32.1% in repair counts. Self-reported m:…0984
- In a preprint, the best model tested scores only 23% on RepoClean, a 200-task benchmark for cleaning obsolete code from repositories. Self-reported m:…3405
- In a preprint, automatically evolved coding-agent harnesses lift Terminal-Bench 2 pass@1 from 69.7% to 77.0%. Self-reported m:…8233
What production code actually costs
The coding-agent boom has a maintenance bill, and a preprint posted this week puts a number on it. Studying production code, its authors report that code attributed to autonomous agents needs corrective modifications 49.1 percent of the time, against 37.9 percent for human-written code. That is not a claim that generated code is unusable. It is a claim that the cost of generating code shows up later, in fixes, and that teams counting only generation speed are counting the wrong thing. m:…0987
The same paper argues that the benchmarks teams use to judge coding models overstate real-world ability. In a preprint, models score 84 to 89 percent correctness on synthetic tasks but only 24 to 35 percent on real-world class-level code. Synthetic tasks are clean, self-contained and well specified. Real classes are not. A team that picks a model on synthetic scores is, on this evidence, buying performance that does not survive contact with a real repository. m:…0987
There is a further problem with knowing what is even generated. The paper reports that leading commercial detectors of AI-generated code have recall between 15 and 64 percent, which means a large share of generated code goes undetected. If a team cannot tell which code an agent wrote, it cannot measure the maintenance gap, let alone manage it. The implication is uncomfortable: the 49.1 percent figure may itself understate the problem, since unattributed generated code would be counted as human. m:…0987
Repair works better when it watches the code run
A second preprint offers a concrete improvement on the repair side. DynaFix grounds patch generation in execution-level dynamic information, feeding variable states, branch paths and call stacks into an iterative repair loop. In a preprint, it beats ReinFix by 15.6 to 32.1 percent in repair counts on the Defects4J-Trans benchmark, and cuts token consumption by 60 to 70 percent against state-of-the-art repair methods. Watching the code run, rather than only reading it, is the difference. m:…0984
A third preprint, a taxonomy of LLM-assisted software migration, explains why repair and migration are harder than generation. It reports that compilation, visual similarity, test outcomes and runtime behavior capture fundamentally different properties and cannot be collapsed into a single success rate, and that most migration studies rely on build success, supplied tests or static proxies as evidence of acceptance. A migration that compiles is not necessarily a migration that works, and the field lacks controlled comparisons of agent architectures for the job. m:…0993
The job agents skip
The sharpest finding in the batch concerns the work nobody asks for. RepoClean is a preprint benchmark of 200 cleanup tasks drawn from 34 Python repositories, testing whether agents remove obsolete code. The best model tested, GPT-6 Astra, scores 23 percent, and the paper reports that agents remove significantly less obsolete code when cleanup is not explicitly requested. Dead code accumulates silently, and agents left to their own devices do not clear it. m:…3405
There is one encouraging result on the tooling side. Agentic Harness Engineering automatically evolves coding-agent harnesses using observability data, and in a preprint it lifts Terminal-Bench 2 pass@1 from 69.7 to 77.0 percent, beating human-designed and self-evolving baselines, with gains that transfer across model families. The gains come from tools, middleware and long-term memory, not from better system prompts. The lesson for engineering leaders is to invest in the harness and the maintenance loop, not in a shinier model, and to ask explicitly for the cleanup work agents otherwise skip. m:…8233
What is still unresolved
- Whether the 49.1% corrective-modification rate holds across codebases beyond the study's sample
- How much of the synthetic-to-real performance gap is benchmark design versus model ability
- Whether harness improvements transfer to repositories unlike the ones in Terminal-Bench 2
Provenance by Synorb. Every claim links to its source. This story was written by an agent from the Manifests listed below. Read the methodology and limitations, or send a correction.
Free to reuse, including commercially. Credit “Hanging Context, with provenance by Synorb” and link to this story. Keep the cited Manifest ids. Reuse terms v1.