Over-Edit Study: Agent Code Is as Needed as Yours, the Tests Are the Bloat
Everyone knows coding agents write bloated patches. A study of 7,660 resolved GitHub Copilot CLI trajectories says that is half true, and the wrong half gets the blame. The paper, posted November 25 by Goel, Steenhoek and Hu, introduces Delta Residue Attribution: replay the agent's run, trace every block of the final patch to the step that wrote it, revert each block, and rerun the tests to see whether it was needed. Developer patches get graded the same way. Paper: https://arxiv.org/abs/2611.34875
The sample covers 18 frontier models on SWE-bench Verified (6,728 runs) and DeepSWE (932). Agent patches do touch more lines. But on Verified, 61% of the extra edits are tests and 13% documentation. On the harder DeepSWE, 58% of the extra is code. And on code alone, agents come out at least as lean as humans: a code necessity score of 0.887 against 0.864 for developers on Verified, where 11 of 18 models leave less unneeded code than the humans did, and 0.797 against 0.785 on DeepSWE.
Not a clean bill, though. On Verified, 11% of an agent patch's code units are still unneeded, and 89% of those change behavior, so this is not harmless whitespace. Debug steps write almost none of it. Necessity also has nothing to do with resolve rate on Verified and runs against it on DeepSWE, with a Spearman correlation of minus 0.59. A model can top the leaderboard while shipping more code nobody asked for, and the leaderboard would never tell you.
Fixes exist but trade off. Pruning with only the tests the agent can see removes most unneeded code but some needed code too, at 67% recall and 46% precision, and 89% of pruned patches still resolve. Asking the agent to audit its own diff is more careful and less useful, 36% recall and 66% precision. The authors want benchmarks to report code necessity next to resolve rate. Agreed. A pass rate that ignores what else changed is like grading a surgeon only on whether the patient woke up.
← Back to all articles
The sample covers 18 frontier models on SWE-bench Verified (6,728 runs) and DeepSWE (932). Agent patches do touch more lines. But on Verified, 61% of the extra edits are tests and 13% documentation. On the harder DeepSWE, 58% of the extra is code. And on code alone, agents come out at least as lean as humans: a code necessity score of 0.887 against 0.864 for developers on Verified, where 11 of 18 models leave less unneeded code than the humans did, and 0.797 against 0.785 on DeepSWE.
Not a clean bill, though. On Verified, 11% of an agent patch's code units are still unneeded, and 89% of those change behavior, so this is not harmless whitespace. Debug steps write almost none of it. Necessity also has nothing to do with resolve rate on Verified and runs against it on DeepSWE, with a Spearman correlation of minus 0.59. A model can top the leaderboard while shipping more code nobody asked for, and the leaderboard would never tell you.
Fixes exist but trade off. Pruning with only the tests the agent can see removes most unneeded code but some needed code too, at 67% recall and 46% precision, and 89% of pruned patches still resolve. Asking the agent to audit its own diff is more careful and less useful, 36% recall and 66% precision. The authors want benchmarks to report code necessity next to resolve rate. Agreed. A pass rate that ignores what else changed is like grading a surgeon only on whether the patient woke up.
Comments