Microsoft study finds AI coding agents write bigger patches, mostly by adding tests

Crypto Briefing

Source published: Site published:

Original article · فارسی

Microsoft official logo (public domain, Wikimedia Commons) — CryptoBriefing brand treatment

Researchers followed 7,660 GitHub Copilot CLI runs. They found that fixes made by AI agents are bigger than fixes made by people, but much of the extra content is tests.

3 min read

In AI

AI coding agents make bigger fixes than human developers. A new Microsoft Research preprint says most of the extra lines are tests, not extra code.

The study, dated November 25, 2026, looked at what advanced AI models do when they get real coding tasks. It found that agents write more, but that does not necessarily mean their work is messier.

What the researchers measured

The authors are Microsoft researchers Aakash Goel, Benjamin Steenhoek, and Yu Hu. They studied 7,660 completed runs from GitHub Copilot CLI, made by 18 advanced AI models.

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

The first finding was about size. On SWE-bench Verified, AI agent patches changed a median of 2.33 times as many lines as the patches human developers wrote for the same problems.

But those extra lines were not all code. 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 find out which lines were actually needed, the team created a method called Delta Residue Attribution, or DRA. It follows patches made by AI agents and tests them again to see how much each part helps produce the final result.

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

There were still problems. About 11% of the AI agents’ code units on SWE-bench Verified were found to be unnecessary after testing.

And 89% of those unnecessary units changed the program’s behavior. They were not harmless leftovers, such as an extra blank line. They were changes that affected how the program worked even though the fix did not need them.

DeepSWE tells a different story

The second benchmark showed a different pattern. On DeepSWE, most of the extra edits were changes to code. These made up 58% of the extra edits.

What this means for developers and toolmakers

The 11% number may be especially useful for people who build software. If about one out of every nine AI agent code units on SWE-bench Verified is unnecessary, and almost all of those units change behavior, finding and removing them is a real engineering problem.

For Microsoft, this research also studies its own product. Every run came from GitHub Copilot CLI, so the company is effectively checking how its agent behaves when it uses 18 different underlying models.

This study is a preprint, so its methods and conclusions have not yet gone through formal peer review. DRA is especially new, and other researchers will likely want to test whether it works well with other tools and codebases.

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

Disclosure: This article was edited by Diego Almada Lopez. For more information about how the publication creates and reviews its content, see its Editorial Policy.