Writing code got faster. Keeping it did not. The clearest numbers come from GitClear, who have published three reports on the question: 153 million changed lines from 2020 to 2023, then 211 million to the end of 2024, then 623 million changes to early 2026, drawn from their customers and large public repositories.
What they measured
Churn, in their definition, is code that is changed or deleted within two weeks of being written. It is the closest thing to a signal for “this was not right the first time”.
Moved code is their proxy for refactoring: lines that were relocated or reworked rather than added fresh. It is the signal for “someone is tidying the house”.
Across the period that AI assistants spread through the industry, churn went up and moved code went down. Churn rose from 3.1 per cent of new code in 2020 to 5.7 per cent in 2024, close to the doubling their first report had projected, and the 2026 report has it up a further 15 per cent. Moved code fell from about 25 per cent of changed lines in 2021 to under 10 per cent in 2024 and 3.8 per cent in the 2026 data. 2024 was the first year copy-and-pasted lines exceeded moved lines. By 2026 copy and paste was 15.7 per cent of changed lines, and duplicated blocks had nearly doubled in three years.
What it does not prove
GitClear cannot see which lines an AI wrote. The reports show the industry’s code changing character over the same years the tools arrived. That is correlation, and they frame it that way, putting the cause on workflow incentives rather than on what the tools can do. Teams grew, remote work changed habits, and junior hiring shifted in the same window.
It is still exactly the pattern you would predict. When a draft costs nothing, you write more drafts. When reading costs the same as before, you read less of each one. The code that nobody read is the code that gets thrown away in week two.
Instant legacy code
Legacy code used to take years to make. It needed staff turnover, a few migrations, and a decade of small decisions nobody wrote down.
Now the same thing arrives on day one. The code works, nobody understands why, and nobody has the appetite to change it. That is the definition of legacy. AI did not create a shortcut to shipping. It created a shortcut to the state a codebase used to reach after five years.
A company that measures its AI programme on time-to-first-version is measuring the cheap part. Churn is the bill for the rest.
What to do about it
The answer is not less AI. It is reading and rules, done in a way that does not slow the draft.
- Review reads for shape, not only for bugs. Does this change fit the way the rest of the codebase does the same thing? Is there a second copy of something that already exists? Those are the questions that catch churn before it happens. The how-to is in reviewing code you did not write.
- The standard is a file the tool reads. A coding-standards file in the repo that the AI tool loads every session. Naming, structure, where rules live, what not to duplicate. It costs one afternoon and applies to every draft after it.
- Track churn yourself. Most git hosts can show how much of last month’s code was touched again within two weeks. If the number climbs after the AI rollout, that is the metric to put in front of the people who approved it.
- Budget the tidy. Refactoring fell because nobody scheduled it. Put a share of each week on moving and merging code rather than adding it.
Done looks like churn flat or falling six months after the tools arrived, with the same or higher output.