Microsoft Study Finds AI Coding Agents Write More Patches, Mostly Tests

iconCryptoBriefing
Share
AI summary iconSummary
A new Microsoft Research preprint shows AI coding agents produce more extensive patches than humans, with on-chain analysis revealing most extra lines are tests and documentation. The study, using on-chain data from 7,660 GitHub Copilot CLI tasks, found agent patches altered 2.33 times more lines. Sixty-one percent of the added code was testing-related. Researchers also applied Delta Residue Attribution to evaluate changes, finding 11% of code units unnecessary.

AI coding agents write bigger fixes than human developers do. A new Microsoft Research preprint finds that most of the extra lines are tests, not additional code.

The study, dated November 25, 2026, looked at how frontier models behave when given real coding tasks. Its conclusion is that agents write more, but they are not necessarily sloppier.

What the researchers measured

The authors are Microsoft researchers Aakash Goel, Benjamin Steenhoek, and Yu Hu. They analyzed 7,660 resolved trajectories from GitHub Copilot CLI, produced by 18 frontier models.

The runs came from two benchmarks. SWE-bench Verified supplied 6,728 of them, and DeepSWE supplied 932.

The first finding is about size. On SWE-bench Verified, agent patches changed a median of 2.33 times more lines than the patches developers wrote for the same problems.

The breakdown of those lines is more mixed. On SWE-bench Verified, 61% of the extra edits were tests, and another 13% were documentation.

A new way to judge whether code earns its place

To work out which lines mattered, the team introduced a method called Delta Residue Attribution, or DRA. It traces agent-generated patches and re-evaluates them to see what each piece contributes to the final result.

On this measure the agents did well. On SWE-bench Verified, the agents’ code necessity score, labeled NP_code in the paper, was higher than the developers’ score on average.

There were problems. About 11% of agent code units on SWE-bench Verified turned out to be unneeded after testing.

And 89% of those unneeded units changed behavior. They were not harmless leftovers like an extra blank line. They were edits that changed how the program runs, even though the fix did not require them.

DeepSWE tells a different story

The second benchmark produced a different mix. On DeepSWE, most of the extra edits were code modifications, which made up 58% of the surplus.

What this means for developers and toolmakers

The 11% figure may be the most useful for practitioners. If about one in nine agent code units on SWE-bench Verified is unnecessary, and nearly all of those change behavior, removing them is a real engineering problem.

For Microsoft, the research is also a study of its own product. All the trajectories come from GitHub Copilot CLI, so the company is in effect auditing how its agent behaves across 18 different underlying models.

This is a preprint, so its methods and conclusions have not gone through formal peer review. DRA in particular is new, and other researchers will likely want to check whether it holds up on other tools and codebases.

For now, the study gives a more measured picture than most commentary on AI coding. AI agents do write more, but on at least one major benchmark, most of the extra is tests and documentation.

Disclaimer: The information on this page may have been obtained from third parties and does not necessarily reflect the views or opinions of KuCoin. This content is provided for general informational purposes only, without any representation or warranty of any kind, nor shall it be construed as financial or investment advice. KuCoin shall not be liable for any errors or omissions, or for any outcomes resulting from the use of this information. Investments in digital assets can be risky. Please carefully evaluate the risks of a product and your risk tolerance based on your own financial circumstances. For more information, please refer to our Terms of Use and Risk Disclosure.