Explainer
What is vibe coding, and when it bites
Vibe coding means building software by prompting an AI and accepting its code without reading it. Where that works, where it fails, and a test before you try.
Bookmark
Bookmarks are kept in your free account, so you can find this page again on any device.
Sign in to bookmarkOn this page
Vibe coding is building software by describing what you want to an AI and accepting the code it writes without reading it: you judge the result by whether the app seems to work, and when it breaks you paste the error back in. It works well for throwaway prototypes and personal tools where a bug costs you nothing. It bites when the code handles secrets, other people’s data, money or users, because nobody has checked what the code actually does.
This explainer covers where the term came from, how it differs from ordinary AI-assisted coding, where it is a good choice, the four ways it goes wrong, and a short test to run before you start. Sources are linked inline; facts were checked on 21 November 2026.
Where the term comes from
Andrej Karpathy coined the term in a post on X in February 2025: “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.” He described accepting every change (“I “Accept All” always, I don’t read the diffs anymore”) and pasting error messages back “with no comment”. He also set its limits in the same post: “It’s not too bad for throwaway weekend projects”.
The wording here is as quoted by Simon Willison, who links the original post. The term spread fast, and it is now often used for any heavily AI-driven coding. That wider use blurs a distinction worth keeping.
Vibe coding is not the same as coding with AI
Willison drew the line in March 2025: “When I talk about vibe coding I mean building software with an LLM without reviewing the code it writes.” If an AI wrote the code and you then reviewed it, tested it and can explain it, he argues, that is software development. His rule for his own repositories: “I won’t commit any code to my repository if I couldn’t explain exactly what it does to somebody else.”
That gives a practical definition. The question is not how much of the code an AI wrote. It is whether anyone who understands the code has looked at it. A developer who has an agent write a whole feature, then reads the diff and runs the tests, is not vibe coding. A developer who accepts a two-line change to an authentication check without reading it is.
Where vibe coding works
Vibe coding is a good choice when being wrong is cheap and you will notice quickly:
- Prototypes to test an idea. A clickable flow to show users or stakeholders, which you plan to throw away or rebuild. App builders such as v0, Lovable and Bolt are built for this; our prototype comparison runs one brief through all three.
- Personal tools. A script that renames your photos or a page that charts your own spending, used only by you, on data you can afford to lose.
- Learning what is possible. Trying a library or an API to see whether an approach is worth building properly.
- Internal throwaways with a deadline. A one-off tool for an event, with no sensitive data and a planned end date. Build an internal tool prototype with AI shows how to do this and list what must change before it meets real use.
In each case the code is a means to an answer (“does this idea work?”), not something you will maintain.
Where it bites
Each of the four failure modes below has the same cause: no one has read the code, so no one knows what it does beyond the happy path you clicked through.
Security flaws you cannot see
Code that runs is not code that is safe. In July 2025 Veracode reported that across 80 coding tasks and more than 100 models, AI-generated code introduced security vulnerabilities in 45 percent of cases. The models failed to defend against cross-site scripting in 86 percent of relevant cases and log injection in 88 percent. Veracode’s summary was that models “are getting better at coding accurately but are not improving at security”, and that larger models did not do significantly better than smaller ones. These are Veracode’s figures from its own benchmark of security-sensitive tasks, not a measured rate across all AI-written code, but the direction is clear: you have to look.
Leaked secrets and runaway bills
Willison flags both in the same post. To keep an API key out of client-side code or a public repository you need to understand how the code handles it. Anything that calls a paid API can run up a large bill if a loop goes wrong, so he advises setting a billing limit before you start. Neither problem shows up while the app “works”.
Code nobody can maintain
A vibe-coded app grows by patches: each error pasted back produces a fix, and nobody holds a model of the whole. When something breaks in a way the AI cannot fix, the person in charge has no map. This is fine for a prototype you will throw away, and expensive for anything you meant to keep.
Changes that never get reviewed
Inside a team, vibe coding moves the burden onto the reviewer. An agent-written diff looks tidy and arrives with a confident summary, which hides where it went wrong. If the author did not read it, the reviewer is the first human to do so, and often reviews a diff far larger than it needs to be. How to review AI-generated code covers what to look for.
A test before you vibe code
Willison’s advice comes down to stakes: ask how much harm the code could cause if it has a bug or a security hole. Before you start, check:
- Only you will use it, or it will be thrown away after a demo.
- It touches no secrets beyond a key you can revoke, and no one else’s data.
- Any paid API it calls has a spending limit set on the account.
- It is not reachable from the public internet, or it holds nothing worth taking.
- You know what you will do when it outgrows the experiment: rebuild it, or review it properly.
If any box stays empty, use an AI coding agent the reviewed way instead. Write down what you want first, approve a plan, and check each change, which is what spec-driven development with AI sets out.
When a vibe-coded project gets serious
Prototypes have a habit of becoming products. When one does, stop adding features and switch modes:
- Read the code, or have someone who can read it walk through it with you. Note what you cannot explain.
- Move secrets to environment variables or a secret store and rotate any key that was ever in the code.
- Add tests for the paths users depend on before you change anything.
- Run a security review of the whole codebase, not only the latest diff.
- From here on, review every change before it merges.
Often the cheaper path is to keep the prototype as a specification and rebuild with review from the start.
Next steps
- Learn the review habits that turn AI-written code into code you can ship in how to review AI-generated code.
- Build features with an agent the reviewed way using spec-driven development with AI.
- Prototype safely with build an internal tool prototype with AI, and pick a builder with Lovable vs Bolt vs v0.
- Check a pull request for security problems with AI security code review of a PR.
- Keep the short definition handy in the glossary entry for vibe coding.
Covers
Check your understanding
Vibe coding quiz
What vibe coding means, how it differs from AI-assisted coding, where it works, how it fails and what to do when a prototype gets serious.
7 questions · pass mark 70%
Review
Related
- Vibe coding
Building software mainly by prompting an AI and accepting its code with little or no reading or review. Fine for throwaway code.
- Reviewing AI-written code: what to look for
The ways agent-written diffs fail, a practical review checklist, and how to set up the work so review stays manageable.
- Prototype an internal tool with an app builder
Build an internal tool prototype with AI with v0, Lovable or Bolt in an afternoon, test it with real users, and list what must change before it meets real data.
- Spec-driven feature build: plan, approve, implement, verify
Written spec, approved plan, small tested tasks and a final check against the spec, not vibes.
- v0 vs Lovable vs Bolt for prototypes
One prototype brief run through v0, Lovable and Bolt: how each builds, what you pay for, how you get the code out, and what is never production-ready.