AI Can Write Your Code. Can It Maintain It?
From the publisher’s feed, collected in the ZeroLabs newsroom.
AI generated code ships fast, but the maintenance data tells a different story. Here’s what comprehension debt actually costs.Six months ago I watched a junior engineer ship a feature in an afternoon that would have taken our team a week. Everyone was thrilled. Then three months later, nobody on that team could explain why one specific function worked the way it did, including the engineer who “wrote” it. That gap, between shipping fast and understanding what shipped, is the real story of AI coding tools this year.READ HERE FOR FREE — FRIEND’S LINKIMAGE GENERATED BY GOOGLE GEMINIWriting code was never the bottleneck computer science romanticized it as. Understanding code, keeping it coherent, and changing it safely six months later always was. AI has gotten spectacularly good at the first part. The data on the second part is starting to come in, and it is not flattering.The Adoption Numbers Everyone Already KnowsEighty four percent of developers now use or plan to use AI coding tools, up from 76 percent a year earlier. AI is estimated to write around 41 percent of new commercial code in 2026, and one analysis projects that share climbing to 65 percent by 2027.Nobody is arguing about adoption anymore. The argument has moved to what all that generated code does to a codebase after the pull request merges.What Happens After the MergeA large scale study tracking AI authored commits across real repositories found that the number of surviving AI introduced issues kept climbing over time, passing 100,000 by February 2026. These were not one off bugs caught and fixed the next day. They were issues that stayed in the codebase.A separate matched comparison of AI generated and human written files across 100 repositories found something specific and uncomfortable: only 16.79 percent of the commits maintaining AI generated files were made by AI agents. The other 83.21 percent were cleanup work done by humans. The AI writes it. The human still has to live with it.Roughly a quarter of the problems AI introduces into a codebase are still there in the latest version, according to an independent analysis of more than 300,000 AI authored commits. Code churn, meaning lines rewritten or reverted within two weeks of being written, has reportedly doubled since before AI coding tools became standard, and code cloning has gone up roughly fourfold.Why the Bugs Aren’t the Real ProblemIf this were just about AI writing buggier code, the fix would be simple: better prompts, more review, stronger tests. But the researchers digging into this are converging on something stranger.Of the technical debt AI introduces, 89.3 percent gets classified as maintainability debt rather than outright defects. That means most of what AI leaves behind is not code that is broken. It is code that works today and makes tomorrow’s change more expensive. One analysis put it plainly: the failure mode of generated code is plausibility, not crashes. It compiles, it passes the happy path test the model also wrote, it reads idiomatically, and it is subtly wrong in a way that only surfaces months later as an incident nobody can trace back to its cause.Researchers cataloguing this pattern describe a specific taxonomy that barely existed before AI wrote code at scale: plausible but wrong abstractions, duplication instead of reuse, untested happy paths, phantom dependencies, and quiet, unrequested scope inflation. None of these show up as a failing test. All of them show up eighteen months later as an outage nobody can explain.Comprehension Debt: The Concept Everyone in Engineering Is Suddenly UsingThe single most useful framing to come out of this year is a term coined by engineer Addy Osmani: comprehension debt. It describes the growing gap between how much code exists in a system and how much of it any human being actually understands.Comprehension debt behaves nothing like ordinary technical debt. Technical debt announces itself. Builds slow down, dependencies tangle, everyone on the team knows which file makes them wince. Comprehension debt hides. The codebase looks clean. The tests are green. The confidence is false, and it stays false until someone tries to change something small and cannot do it without breaking a part of the system nobody realized was connected.Human code review used to force comprehension as a side effect. Reading a teammate’s pull request meant understanding their assumptions and catching decisions that conflicted with how the system actually worked. AI generated code breaks that loop simply through volume. A junior engineer can now generate a thousand lines of syntactically perfect code faster than a senior engineer can meaningfully audit it.There is early experimental evidence behind this. In a randomized controlled trial with 52 software engineers learning a new library, the group using AI assistance finished the task in the same amount of time as the control group, but scored 17 percent lower on a follow up comprehension quiz. The AI did not save them time on understanding. It just moved the cost somewhere the velocity dashboard does not look.The Numbers Side by SideBY AUTHORCan AI Actually Maintain What It Writes?The honest answer, based on everything above, is not yet, and not on its own. AI agents are excellent at generating plausible new code and comparatively weak at understanding the accumulated context of an existing system well enough to change it safely. That is exactly the skill maintenance requires.This does not mean AI coding tools are a mistake. It means the industry mislabeled what they save. They save typing time. They do not, by themselves, save comprehension time, and comprehension time is what maintenance actually costs.Teams that are handling this well are not slowing down adoption. They are changing what they measure. Static analysis, duplication tracking, and change hotspots still matter, but the teams ahead of this are watching those signals at the pull request level instead of in a weekly report, because AI generated debt accumulates fast enough that a week is too slow to catch it.What This Looks Like in PracticeReview AI generated code for understanding, not just for whether it passes. If nobody on the team can explain why a change works, treat that as a blocker, not a formality.Watch for duplication specifically. Forty percent of developers cite duplicative or unnecessary AI generated code as a debt source, often because the AI did not know a shared utility already existed.Do not trust green tests alone. AI can update hundreds of test cases to match new implementation behavior, which means the safety net can quietly stop verifying what you think it verifies.Reserve vibe coding, meaning accepting AI output with little review, for prototypes and internal tools. Keep human review, testing, and security scanning in place for anything that touches real users or real data.Track who actually maintains AI authored code over time. If it is almost entirely humans, budget accordingly instead of treating the original generation speed as the whole cost.Frequently Asked QuestionsWhat is comprehension debt? Comprehension debt is the growing gap between how much code exists in a codebase and how much of it any human genuinely understands, a cost that AI generated code creates by producing far more code than a team can meaningfully review or absorb.Is AI generated code actually less secure? Testing across more than 100 large language models and 80 coding tasks found that AI generated code introduced security vulnerabilities in 45 percent of cases, with failure rates above 70 percent for Java specifically.Does AI maintain the code it writes? Rarely so far. A matched comparison of AI and human written files found that only about 17 percent of the commits maintaining AI generated files came from AI agents, with the rest done by human developers.Is vibe coding safe for production systems? It is reasonable for prototypes, internal tools, and throwaway experiments, but risky for production systems handling real users or data, since the same speed that makes AI coding appealing also correlates with more frequent security and quality problems without review in place.Does using AI to code actually make developers faster? Not always, and not in the way most people assume. One randomized trial found experienced developers were 19 percent slower using AI assistance on real tasks, even though they predicted beforehand that it would make them 24 percent faster.The Real TakeawayAI did not make software maintenance obsolete. It moved the cost downstream, out of the sprint that shipped the feature and into the sprint six months later that has to understand it. The teams handling this well are not the ones generating the most code fastest. They are the ones still able to explain, in plain language, why every load bearing piece of their system behaves the way it does.If you found this useful, follow along. The maintenance data on AI coding is still coming in, and it is going to keep getting more specific.If this helped you rethink the hidden costs of AI-generated code — and why long-term maintainability, technical debt, and refactoring still demand human judgment — a clap 👏 goes a long way. I’ll be sharing more practical breakdowns on AI developer tools, software architecture, legacy maintenance, code quality, and how modern engineering workflows are actually evolving.Follow Phynix AI for more actionable insights on AI tools, software engineering, code maintainability, developer workflows, programming, and the future of building robust software.AI Can Write Your Code. Can It Maintain It? was originally published in Towards AI on Medium, where people are continuing the conversation by highlighting and responding to this story.