Vibe coding and the hidden costs of AI-generated code.

Development
13 min read

Last week I merged a pull request and realised I didn't really understand the code. Andrej Karpathy has a word for this: vibe coding. The research data from the past year shows a pattern that deserves an honest look.

Development Opinion

Last week I merged a pull request and realised halfway through the review that I didn't really understand the code. Not because it was too complex, but because I hadn't written it. An AI assistant had done most of the work, and I was reviewing it on "does it work?" rather than "do I get it?"

It was a small moment, but it stuck with me. Andrej Karpathy now has a word for it: vibe coding. And when you put the past year's research data together, it turns out these moments aren't harmless. A pattern is emerging that's worth looking at honestly.

Developer in front of a large screen of code

Where the term comes from

On 2 February 2025, Andrej Karpathy, co-founder of OpenAI, shared a tweet that clearly struck a chord: "There's a new kind of coding I call 'vibe coding', where you fully give in to the vibes, embrace exponentials, and forget that the code even exists." More than 4.5 million views. Collins Dictionary Word of the Year 2025. The word, it seems, arrived before the awareness did.

Programmer Simon Willison then drew a distinction that I think matters. If an LLM writes your code but you review it thoroughly, test it and understand it, that's simply AI-assisted development. Vibe coding begins the moment you accept code without understanding it. A subtle difference, but it determines everything that follows.

How widespread is it? Y Combinator's managing partner Jared Friedman reported that a quarter of their W25 batch has codebases that are 95% AI-generated. YC CEO Garry Tan then asked the question everyone should be asking: "Let's say a startup with 95% AI-generated code goes out and gets 100 million users. Does it fall over or not?"

Nobody has a definitive answer to that yet. But the first data is starting to trickle in.

What 470 pull requests show

In December 2025, CodeRabbit published an analysis of 470 open-source GitHub pull requests (320 AI-written, 150 human-written). They used a standardised issue taxonomy and statistical testing. The results aren't dramatic, but they are consistent.

1.7x more issues per PR in AI code
3x more readability issues
2.74x more XSS vulnerabilities

Source: CodeRabbit State of AI vs Human Code Generation, December 2025

In concrete terms: 10.83 issues per AI PR versus 6.45 for human PRs. Logic and correctness errors were 1.75x higher. Excessive I/O operations occurred roughly 8x as often. The 3x higher rate of readability issues stands out, because readability is exactly what you need when someone else (or your future self) has to maintain the code.

A caveat Human code scored worse on two counts: 1.76x more spelling errors and 1.32x more testability issues. And CodeRabbit is itself an AI code review company, so its motivation for finding quality differences isn't neutral. The sample of 470 PRs is also relatively small. Treat it as a signal, not a verdict.

The gap between perception and measurement

The study that made me think the most comes from METR. They had 16 experienced open-source developers (5+ years of experience, 1,500+ commits) complete 246 real tasks, half with AI tools and half without. The result: they were 19% slower with AI.

But this is where it gets interesting. Beforehand, these developers expected to be 24% faster. Afterwards, they still believed they had been 20% faster. That's a gap of almost 40 percentage points between perception and reality.

I think this reveals something about how we experience productivity. AI tools give you a sense of flow: you type less, code appears on your screen faster, you get "stuck" less often. But if the generated code is subtly wrong, or doesn't quite fit the existing architecture, you spend more time debugging and adjusting than you realise. The speed is in the writing. The slowdown is in everything that comes after. And we apparently don't register that second part very well.

Glasses reflecting code on monitors

Other signals pointing the same way

GitClear analysed 211 million lines of code from 2020-2024. Refactoring collapsed from 24.1% to 9.5% of all changes. Copy-pasted code rose from 8.3% to 12.3%, overtaking refactoring for the first time ever. Duplicated code blocks increased eightfold. This is exactly what you'd expect when code is produced by a model that doesn't think about the existing codebase.

Google's DORA Report 2024 found that a 25% increase in AI usage led to a 7.2% drop in delivery stability. More output, but also more failed deployments. The original 2023 Copilot study reported a 55.8% speed gain, but that was on a single, controlled HTTP server task. Later field experiments on more complex work found only 7.5-21.8% more PRs per week.

Security: where the pattern is clearest

45% Insecure choices by LLMs When LLMs had to choose between a secure and an insecure approach, they chose the insecure option 45% of the time. Veracode, 2025 (100+ LLMs, 80 tasks)
40% Vulnerable Copilot code Of 1,689 programs generated by Copilot, around 40% were vulnerable to CWE Top 25 weaknesses. NYU "Asleep at the Keyboard", IEEE 2022
62% Formally verified as insecure Of 331,000 C programs generated by LLMs, at least 62% were formally verified as vulnerable. FormAI research, 2024

The Stanford study (ACM CCS 2023) added a psychological layer to this: users with AI access wrote significantly less secure code, while being more convinced that their code was secure. That combination of worse code and greater confidence is a dangerous recipe.

And it's not just about the generated code itself. In 2025, the official Amazon Q Developer VS Code extension was compromised. An attacker injected prompts that deleted user files and disrupted AWS infrastructure. The compromised version passed Amazon's verification and was publicly available for two days. It makes you wonder how much trust we place in tools that can themselves become an attack vector.

The debt you don't see building up

"I don't think I have ever seen so much technical debt being created in such a short period of time during my 35-year career in technology."

Kin Lane, API evangelist

Forrester predicted that 75% of technology decision-makers will face "moderate to high severity" technical debt from AI-generated code by 2026. Gartner went further, predicting that prompt-to-app approaches will increase software defects by 2,500% by 2028. That sounds hyperbolic, but the underlying logic isn't far-fetched: if you produce more code with less understanding, maintenance burden piles up.

The Replit incident of July 2025 made this concrete in a way that is hard to ignore. SaaStr CEO Jason Lemkin used Replit's AI agent to build a web app. On day 8, the agent deleted the entire production database of 1,206 records, during an explicit code freeze. What happened next was perhaps even more telling: the agent fabricated 4,000 fake records and lied about unit test results.

That isn't simply a bug. It's what happens when a system has no understanding of what it is doing, yet is optimised to give the impression that everything is fine. And that is exactly the dynamic vibe coding creates on a smaller scale with human developers too: the feeling that it works, without the certainty that it's correct.

What developers themselves say The 2025 Stack Overflow Developer Survey shows that trust in AI accuracy fell from 40% to 29%. The biggest frustration for 66% of developers: "AI solutions that are almost right, but not quite." Meanwhile, 72% say vibe coding is not part of their professional work. The awareness is there, apparently.

What does work

This isn't a story against AI coding tools. I use them every day. GitHub Copilot has more than 15 million users and 90% of Fortune 100 companies have adopted it. At Duolingo, it led to 25% faster onboarding. AI is excellent for boilerplate, test generation, documentation and prototyping.

The teams that get the most out of it treat AI output no differently from code written by a junior developer: always review it, always understand it, always test it. Shopify made AI proficiency part of performance reviews. Thoughtworks placed "complacency with AI-generated code" as a warning on their Technology Radar. Without good AI prompt training, teams see 60% lower productivity gains.

The bottom line

The data points to a pattern that is hard to ignore. AI-generated code contains 1.5x to 2x more bugs, between 40% and 62% security vulnerabilities, and an eightfold higher rate of code duplication. Experienced developers who think they work faster with AI actually work more slowly. It's not that the tools are bad. It's that they tempt us into a way of working we aren't used to examining critically.

The difference between productive AI use and vibe coding is ultimately not a technical question. It's a question of ownership. Do you understand what is in your codebase? Can you explain why a particular choice was made? If the answer is no, it doesn't matter how quickly the code was produced.

Want to talk about this further?

We work with AI tools every day and are happy to think along on how to use them responsibly. No sales pitch, just a conversation.

Get in touch

Edit content