Coding Agents Write More. Most of It Is Tests.
A November 25, 2026 arXiv study replayed 7,660 coding-agent runs and found bigger patches are mostly tests and docs, with agent code at least as necessary as developer code. Here is what it measured and how to review smarter.
Amir Ali Liaqat · Founder & CEO, DesignsToDeploy

Every reviewer of agent-written code has seen the same thing: a patch that changes far more lines than the fix seems to need. The natural read is over-editing, an agent rewriting code it did not need to touch. A new study asks whether that read is fair, and it answers with data instead of opinion. The paper, How Much Do Coding Agents Over-Edit, and Why?, was submitted to arXiv on November 25, 2026 by Aakash Goel, Benjamin Steenhoek and Yu Hu. It replays 7,660 resolved GitHub Copilot CLI runs from 18 frontier models and checks, block by block, whether each edit was actually needed. The headline is calmer than the complaint: agents do write more, but most of the extra is tests and documentation, and the code they write is on average at least as necessary as the code developers wrote for the same tasks.
What the researchers measured
The runs come from two benchmarks: SWE-bench Verified with 6,728 resolved trajectories, and DeepSWE with 932. Resolved means the patch passed the task tests, so the study covers successful runs only, all through one harness, GitHub Copilot CLI. Agent patches do change more lines than developer patches. Coverage of the paper reports a median of 2.33 times more lines on SWE-bench Verified. The breakdown matters more than the total. On SWE-bench Verified, 61% of the extra edits add tests and another 13% add documentation. On DeepSWE the mix flips: 58% of the extra edits are code. Same agents, different benchmark, different surplus. That alone should retire the habit of judging a patch by line count.
Revert, rerun, decide: the DRA method
To judge necessity, the team built a method called Delta Residue Attribution, or DRA. It replays an agent trajectory, traces every block of the final patch to the step that wrote it, then reverts each unit on its own and reruns the task tests. If the tests still pass without that unit, the unit counts as unneeded. Developer patches were graded with the same method, so the comparison is apples to apples. Necessity here means one specific thing: the tests still pass. Code that no test exercises looks unneeded, so the authors treat their unneeded share as an upper bound, not an exact waste figure. Weak tests produce a weak verdict, which is itself a useful warning for teams with thin test suites.
The numbers that change the review
On SWE-bench Verified, the mean code necessity score, labeled NP_code in the paper, is 0.887 for agents against 0.864 for developers. Eleven of the 18 models left less unneeded code than the developers did. On DeepSWE the gap is narrower, 0.797 against 0.785, but the direction is the same. Necessity varies substantially by model, and it does not track how many tasks a model solves: no relationship on SWE-bench Verified, and a negative correlation on DeepSWE (Spearman -0.59), where models that resolved more tasks tended to leave more unneeded code. Picking an agent by resolve rate alone, in other words, tells you nothing about how clean its patches are.
The caution sits inside the good news. On average, 11% of an agent patch's code units on SWE-bench Verified are still unneeded, about one in nine, and 89% of those change program behavior. They are not harmless padding like an extra blank line; they are edits that alter how the program runs without being required for the fix. Debug steps, notably, write almost none of the unneeded code. For a reviewer, that 11% is where the time belongs: test files and docs are cheap to skim or drop, while behavior-changing code units that nobody asked for are where bugs hide.
Can you prune the waste automatically?
The paper tests two cleanups. Pruning with DRA, using only the tests the agent can see (its own tests and the repository tests), removes the majority of unneeded code but also some needed code: 67% recall and 46% precision, with 89% of pruned patches still resolving the task. Asking the agent to audit its own diff is more precise but less effective: 36% recall and 66% precision. Neither is a free lunch. The authors recommend that benchmarks report code necessity next to resolve rate, and that over-editing be addressed through model training and harness-level pruning. Until tooling catches up, the practical move is human: review the code units, keep the tests, and treat a large patch as a prompt to look closer, not as proof of waste.
What to do with it
- STOP JUDGING BY LINES: a large agent patch is mostly extra tests and docs on SWE-bench Verified. Spend review time on the code units, not the total.
- HUNT THE 11%: about 1 in 9 code units unneeded, 89% behavior-changing. Ask for a prune pass before merge, and check what it removed.
- PRUNE WITH CARE: automatic pruning catches most waste but removes some needed code too. Verify pruned patches against the full test suite, not only the visible tests.
- PICK BY NECESSITY: necessity varies by model and does not follow resolve rate. Compare models on clean patches, not only solved tasks.
- STRENGTHEN YOUR TESTS: necessity is judged by tests. A thin suite cannot tell needed code from waste, for agents or for humans.
Read the limits before you quote the study. This is a preprint, so it has not gone through formal peer review, and DRA is a new method other researchers will want to test on other tools and codebases. All runs used one harness, GitHub Copilot CLI, across 18 underlying models, and only resolved runs were studied. Failed runs, other harnesses and private codebases may behave differently. The direction is still valuable: size overstates waste, necessity can be measured, and the remaining waste is concentrated enough to review for.
“Size is not waste. Measure necessity.”
— DesignsToDeploy
At DesignsToDeploy we build with coding agents every day, and the lesson matches our workflow: keep the tests agents write, review the code they change, and prune what the task never asked for. If your team wants agent workflows with review guardrails built in, from editor setup to full product builds, talk to us at designstodeploy.dev.
1 / 5Keep reading

Git 2.56: Safer Conflicts, a Tidier Repo, and Much Faster History
Git 2.56 landed in late September 2026 with one theme: stop the small mistakes that cost teams hours. Here is what changed, from git add --resolved and branch cleanup to merge-base speedups that turn minutes into milliseconds.
Read article
Node 26 Goes LTS: Patch First, Upgrade Smart
On October 28, 2026, Node.js 26 becomes the long-term support release your production apps should run on. Five days earlier, a security release patched Node 22, 24 and 26 together. Here is the timeline, the fixes, and the safe upgrade order.
Read article
VS Code 1.145: Coding Agents That Work While You Sleep
VS Code 1.145 shipped November 4, 2026, turning the editor into an agent host: remote agents you can preview in the Agents window, automations on a five-field cron schedule, and nested sessions that mix harnesses. What changed, what is still preview, and the four moves to set it up today.
Read article