Skip to content

Ideas · Essay

AI made code cheap to write. It did not make it cheap to own

Writing code was never the expensive part of software. Owning it is. The latest repository data suggests AI is quietly moving cost from the first to the second.

By Nythrex team2 min read

Aerial view of a suburb of near-identical houses along curving streets.
Copies are quick to build and each one still needs a roof repaired. Photo: Derek Jensen, public domain, via Wikimedia Commons.

Every new line of code is a small liability. Somebody has to read it, test it, keep it compatible, fix it when a dependency changes and delete it when the feature dies. For decades that cost was held in check by the effort of writing code in the first place. AI removed the effort.

The result is not bad code, exactly. It is more code — more of it duplicated, less of it consolidated — and a maintenance bill that arrives months after the sprint that looked so productive.

The case for more code, faster

The optimistic reading is fair. Generated code is often fine. Duplication is sometimes the simplest option, refactoring for its own sake wastes time, and a team that ships more features learns more from its users. If the code works and the tests pass, why worry about its shape?

What the repositories show

Because shape is what decides the cost of the next change. GitClear, which analyses code-change data, has tracked it for several years. Its 2025 report found that in 2024, for the first time, copy-pasted lines outnumbered moved lines — its proxy for refactoring. Its 2026 report, The Maintainability Gap, covers 623 million changes from 2023 to 2026: moved code fell from 13% of changed lines to 3.8%, duplicated lines rose from 40.3 to 73.0 per million changed lines (up 81%), and cross-file function calls, a sign of reuse, fell 35%. Error-masking constructs rose 47%, and code churned within two weeks rose 15%.

The saving is booked in the sprint. The cost is booked in the years after.

GitClear is careful about the cause. Its argument is not that AI writes uniformly bad code, but that the default workflow rewards a passing test and a closed ticket while deferring reuse and consolidation. Deferred work does not disappear. It makes the next change slower, riskier and more expensive.

A dense tangle of overhead cables coiled around a pole on a city street.
Every line added is a line someone will maintain. Photo: Jakub Hałun, CC0, via Wikimedia Commons.

Price the change over its life

The fix is not to slow AI down. It is to stop counting only the first draft.

  1. Budget time for refactoring and maintenance explicitly, as GitClear recommends, instead of hoping it happens.
  2. Look for duplicated blocks and short-term churn in review, not only for passing tests.
  3. When you compare the cost of AI-assisted work, include the follow-up changes, reverts and fixes that land on the same code later.

Where Nythrex fits

Nythrex shows what each change cost, from AI session to commit, pull request, CI and deploy, by project and team, with the basis for every figure. Follow-up changes are costed like any other, so a project where cheap first drafts lead to expensive rework shows it in its trend. It does not measure code quality, and it does not rate developers.


Sources

Frequently asked questions

Does AI-generated code increase technical debt?

Repository data points that way. GitClear’s 2026 analysis of 623 million changes found duplicated lines up 81% and refactoring (moved code) down from 13% to 3.8% of changed lines between 2023 and 2026.

How should teams manage the maintenance cost of AI-written code?

Budget refactoring time explicitly, check for duplication and short-term churn in review, and judge AI-assisted work by what changes cost over their life, including later fixes.

Stop guessing.
Start seeing.

No card and no subscription: paid plans have not launched yet.

Create accountNo card, no subscription