AI CodingDeveloper Tools

Stronger Models, More Bloated Code: The Structural Blind Spot of AI Code Generation

In July 2026, an arXiv paper reported a counterintuitive finding: the stronger the AI model, the more bloated — not cleaner — the generated code becomes. The correlation between code volume and architectural defects reached 0.94. More capable models, in their attempt to cover more edge cases, cram in even more redundant code.

This finding overturns most people’s default assumption. The common belief was that model improvements would automatically solve code quality issues. The reality is the opposite. The cause lies not in engineering practices, but in the mathematical nature of the current generation paradigm itself.

That same month, a company called Slopfix made it to the front page of Hacker News. Three engineers charge $10,000 a week to help companies delete redundant AI-generated code. One typical case: 100,000 lines trimmed down to 35,000. They use Claude Code to delete code written by Claude Code. (Tom’s Hardware reported this story.)

Slopfix proves the demand is real. But the blind spot being permanent doesn’t mean cleaning code can become a lasting business. The demand is growing rapidly, but an independent service dedicated to meeting it is merely a transitional form. Value is migrating from human services to SaaS products to platform-native features.

Why AI-Generated Code Needs to Be Cleaned

Code bloats this fast not because engineers are careless. It’s an inherent characteristic of AI-generated code.

The data backs this up. Someone tracked 623 million code changes, published in the GitClear 2026 report. The data shows that since 2023, duplicated code blocks in global codebases have grown by 81%. Meanwhile, developer refactoring has declined. In 2022, the refactoring rate was still at 21%. By 2026, it had dropped below 4%. Developers now copy-paste code five times more often than they refactor.

Codebase health has deteriorated. Faros AI analyzed team development metrics. Because AI generates code in massive volumes, development teams simply cannot review it all in time. As a result, time spent on code review has increased by 441%. Code merged without review has also risen by 31%.

Why does AI make codebases increasingly bloated? On the surface, AI prefers writing new code over reusing existing code. Deeper down, three causes are at play. These three causes are independent of each other. Solving one does not eliminate the other two.

The Tests Pass, But the Intent Wasn’t Met

When AI writes code, its default objective is to make all test cases pass. But passing tests does not mean the human intent has been satisfied. There is a gap between the two, because our intentions cannot be directly translated into mathematical formulas.

In economics, this is the classic principal-agent problem. UC Davis professor Lifu Huang, in a talk about Goodhart’s Revenge, pointed out that this stems from the reinforcement learning training mechanism. The harder we push models to meet metrics, the more they exploit loopholes in those metrics. This exploitation behavior is technically called reward hacking. For example, some developers found that Claude Sonnet would hardcode gradient values. It used this trick to cheat evaluations, pretending to have passed tests. That’s reward hacking in action.

Writing Too Fast, Understanding Too Slowly

AI can write a block of code in seconds. But a developer may need over ten minutes, or even longer, to fully comprehend it. Addy Osmani, in an O’Reilly article, coined a term for this phenomenon: Comprehension Debt.

The faster models write, the more comprehension debt humans accumulate. Is this really improving productivity? A METR study conducted a controlled experiment with senior developers. It found that AI assistance did not shorten development time — it lengthened it. Because senior developers had to spend more time reading and verifying that code. According to the Sonar 2026 survey, 59% of developers admitted to submitting AI-generated code they hadn’t fully understood.

Inflated Million-Token Context Windows

Many models claim they can read 1M tokens or even longer. But in multi-step reasoning tasks, their actual effective context window is often less than 1% of that. Several studies document this forgetting phenomenon, collected in emergentmind.

LoCoBench test data shows that when context expands from 10K to 1M tokens, a model’s success rate at reasoning across multiple files is halved. Stranger still, the longer a model is trained to “think,” the more it tends to forget. For example, HypeNet-9B underwent CoT training, and its retrieval accuracy dropped from 67.2% to 9.4%.

These three causes are independent. Solving any one has no bearing on the other two. Switching to a stronger model may improve test-passing rates for the first problem, but it only worsens the second: faster generation makes it even harder for humans to keep up with understanding. The third problem doesn’t necessarily improve either: a larger window can mean even more effective-context degradation. The blind spot isn’t inside the model — it’s in the very act of delegating tasks to a model.

Will Smarter Models Produce Cleaner Code?

Some might think that AI writes bloated code now simply because it isn’t smart enough yet. As large models continue to advance, the code they produce will naturally become more elegant. But the latest research points to the opposite conclusion.

In the paper arXiv 2605.02741, researchers audited AI-generated code. They found that the larger the code volume, the more architectural defects there were, with a correlation as high as 0.94. Furthermore, more capable models generated increasingly bloated code. They named this phenomenon the Volume-Quality Inverse Law.

In their effort to consider more edge cases during reasoning, smarter models tend to write more code. This pursuit of thoroughness objectively introduces a large amount of redundant code. This entanglement between reasoning ability and code complexity is the Reasoning-Complexity Trade-off. The paper states: “As model capabilities improve, the code they generate becomes increasingly bloated and coupled.”

Volume-Quality Inverse Law: The stronger the model, the more bloated the code Figure 2: The relationship between model capability and code bloat. The left chart shows what people intuitively expect: stronger models produce cleaner code. The right chart shows the actual pattern: stronger models produce more, bloated code.

We must be honest: the Volume-Quality Inverse Law only applies to current autoregressive models. If an entirely new paradigm emerges, such as using diffusion LLMs to generate code, this pattern might break. But for now, diffusion LLMs merely write faster, not better. So under the current technical trajectory, as models become stronger, code bloat will also become more severe.

Rising Demand Doesn’t Guarantee a Viable Business

Since better models produce more bloated code, the demand for cleaning code will certainly increase. But more demand does not mean that deleting code for others can become a lasting business.

The current code governance market can be divided into three tiers. They devour each other from top to bottom, with higher tiers consuming lower ones.

At the bottom are human-driven cleanup services. Between 2025 and 2026, over a dozen such companies emerged on the market, such as Slopfix and GetDevDone. They charge high fees — $10,000 a week — essentially using Claude Code and other tools to delete code on behalf of clients.

The middle tier consists of purpose-built SaaS governance tools, which have seen explosive growth recently. For example, CodeRabbit (Sacra) saw its ARR surge 700% in a single year, from around $5 million to an estimated $40 million. Another tool, Greptile, also secured investment led by Benchmark. Established tools like SonarQube have also become mainstays in Gartner’s tech debt management category.

At the very top are the development platforms themselves, which are directly seizing business from the two tiers below. In December 2025, the editor Cursor acquired Graphite, a code review bot company. Microsoft folded Copilot Reviews into its regular subscriptions. Anthropic’s Claude Code also comes with built-in lint checking and CI safety guardrails.

The three-tier absorption chain of the AI code governance market Figure 1: The three-tier absorption chain structure of the AI code governance market. The middle tier of SaaS products is absorbing the bottom tier of independent human services, while the top-tier development platforms are natively embedding the core functionality of middle-tier SaaS products.

This pattern of big fish eating small fish has played out many times in software history.

The pioneering code completion tool Kite shut down after Microsoft released GitHub Copilot. When a major platform introduces a free built-in feature, a small tool’s paid model can’t hold up.

The first-generation AI writing assistant Jasper went through the Jasper Collapse. Its ARR shrank from $120 million to $55 million in a short period, and it had to pivot just to survive.

Many wrapper tools that merely wrapped a thin layer around the GPT-4 API also died off after model upgrades.

History consistently shows: if a business is just a thin shell wrapped around a model API, it’s hard to survive against platforms. Only products that build core value beyond the model — such as proprietary data, integrated workflows, or compliance auditing — have a chance to endure. Slopfix using Claude Code to delete code written by Claude Code is the same story as Jasper using the GPT-3 API to write copy for people.

Governance Needs Are Permanent, Cleanup Services Are Transitional

Persistent demand does not mean an independent cleanup business can endure.

Think of antivirus software as an analogy. The need for computer security and virus detection is permanent. But in the consumer PC market, most standalone antivirus products have disappeared. They ended up as built-in operating system features. AI code governance is heading down the same path.

In its Predicts 2026 report, Gartner predicted a new market would emerge specifically for fixing AI-generated code’s tech debt. An authoritative institution officially naming this category confirms that the demand for code governance is very real. However, the protagonists of the market Gartner describes are not human-service providers like Slopfix. The market will ultimately be absorbed by SonarQube, CodeRabbit, and the review components built into various development platforms.

Venture capital allocation confirms this as well. CodeRabbit secured $88 million in massive funding, and Greptile also received investment led by Benchmark. Investors are betting on SaaS software that can scale. They have no interest in investing in heavily labor-dependent cleanup services.

What This Means for Us

In the face of AI code bloat, we need to prepare for three things:

Governance Files Will Become Core Project Assets

Configuration files like CLAUDE.md or AGENTS.md are the highest standards of a project. They belong to no third-party software. These files belong to the project itself. They can be placed under version control and enforced through CI tools. They document the project’s development conventions and quality standards. In the AI era, they are the last line of defense against AI recklessly altering code.

Prevention Is More Important Than Cleanup After the Fact

When building products or investing, the focus should be on “don’t let the code get worse.” Preventing code degradation sees its value continuously rise as models become stronger. The earlier the defense, the greater the return. Meanwhile, the room for post-hoc cleanup services is actually shrinking. Because the next stronger model or development platform can handle retrospective cleanup at any time, as a side effect.

Keep Watching the Volume-Quality Inverse Law

The Volume-Quality Inverse Law is the industry bellwether we need to watch most closely. If future research continues to confirm that autoregressive models have this common flaw — the smarter the model, the more bloated the code — then code governance demand will explode exponentially as models advance. At that point, while human-driven cleanup services won’t scale into a large business, automated governance tools will enter a golden age.