Source: https://www.hype-stack.dev/stacks/is-vibe-coding-bad

# Is Vibe Coding Bad? Four Ways It Fails and the Setup That Holds

> Vibe coding is a fine way to make something and a risky way to run it. What decides which one you are doing is whether
> anyone reads the code before strangers depend on it.

Is vibe coding bad? It depends which of two things you mean. The original sense, from Andrej Karpathy in early 2025, is
accepting whatever the model writes without reading the diff and steering only by whether the app seems to work. The
looser sense people use now is any app built mostly by prompting, with Lovable, Bolt, Replit, Cursor or Claude Code
doing the typing. The first is a technique for throwaway work. The second can produce software people pay for.

You can see both in one place. A long Ask HN thread asking for a single successful vibe-coded product has builders
posting SaaS products with paying customers, right next to people asking why nobody can name one. Both sides are
describing real projects. The difference is what happened after the demo worked.

So the useful question is narrower: when does it go wrong, and what stops it. The failures are specific, they repeat
across tools, and they tend to arrive in the same order, a few weeks after launch.

**See templates built for coding agents** Browse application starters that ship rules files, typed routes and release-time migrations, the parts this page says an agent needs.

[Browse the templates](https://www.hype-stack.dev/templates)

## When vibe coding is the right call

**Where not reading every line is a fair trade**

- **A prototype you expect to throw away** You are testing whether anyone wants the thing. If the answer is no, the code was never going to matter, and a builder gets you to the answer fastest.
- **An internal tool for a small team** A handful of people who know you, no payment data, and a spreadsheet as the fallback. Several of the success stories in that thread are this shape, including a bar's stock tracker written entirely with Claude Code.
- **A project with one user** If it breaks, you notice first and nobody else is hurt. Replacing a subscription you pay for with something you built in a weekend is a good trade.
- **Interface code you can look at** A screen either looks right or it does not. Visual work is where judging by the result holds up best, which is why many developers vibe code the frontend and write the backend carefully.

What these share is that you are the person harmed when it breaks. Once strangers sign up, pay, or upload data, that
stops being true, and the four failures below start to matter.

## The four ways it goes bad

### 1. The agent loses the plot after an hour

"Productive for an hour, then burns my application down" is the title of a real Ask HN post, and it describes a
mechanism rather than bad luck. A long session pushes early decisions out of the model's working context. The agent
forgets the pattern it set up at the start, writes a second one next to it, and sometimes swaps working code for a
placeholder to make an error disappear.

Conventions that live in the conversation get lost with it. Conventions that live in files the agent loads at the start
of every session do not. Short tasks and fresh sessions do the rest. The setup for Claude Code specifically, file by
file, is on [how to vibe code with Claude](/stacks/how-to-vibe-code-with-claude).

### 2. It reaches production with nothing in the way

In July 2025 a Replit agent deleted a startup's production database during an announced code freeze. The cause was not
exotic: the agent could reach production with the same access it used for development, and nothing separated the two.
Replit's own fix afterwards was to split development and production databases. A junior developer with the same
credentials could do the same damage. An agent just runs the command faster and explains it afterwards.

The fix is old and boring. Separate databases per environment, schema changes as reviewed migration files rather than
commands someone runs live, and a backup you have restored at least once. Keep the production connection string out of
the agent's environment.

### 3. The holes are the ones nobody asked about

A model writes what the prompt describes. Nobody prompts "and make sure user A cannot read user B's invoices", so the
check is often missing, and the app works perfectly in a demo with one account. The other repeat offenders are secrets
put in a frontend environment variable, which Vite and most bundlers ship to every browser, and database access rules
switched off to make an error go away.

The full code-level list is on [the web app security checklist](/stacks/web-app-security-best-practices). The part that
matters here is structural: authorization belongs in one place every route passes through, not in each handler, where
the agent has to remember it every time.

### 4. Nobody can review what it wrote

The Ask HN thread "Is anybody producing good code with coding agents?" splits cleanly. The people happy with the output
write a spec first, ask for small pieces, and review each one before the next. The unhappy ones let the agent run long
and then face a diff too big to read. Reading two thousand generated lines cold is harder than writing two hundred, and
the unread part is where vibe coding turns into debt.

A type checker is the cheapest reviewer you have. When the backend's route types flow into the frontend's client, a
change that forgets a consumer fails at typecheck in the agent's own loop, before you see it.

## What changes the odds

None of the four fixes is a better prompt. They are properties of the codebase the agent works in, which is why the same
model does well in one repository and makes a mess in another. This is the part we build, so read it as our approach
rather than a neutral survey.

**What the Better Studio template gives an agent before the first prompt**

- **Rules it reads every session** At create time the CLI writes the rules in each agent's own format: .claude/rules for Claude Code, .cursor/rules for Cursor, AGENTS.md for Codex and OpenCode. One backend rule tells the agent to throw ApplicationError instead of wrapping routes in try/catch, so errors reach one middleware instead of being swallowed. That is the answer to failure one.
  - .claude/rules
  - AGENTS.md
  - ApplicationError
- **Tenancy checked in one place** Every feature table carries an organizationId, and the value comes from ctx.var.organizationId, which withAuthUser sets only after confirming the user belongs to that organization. The rules tell the agent never to read an organization id from the body, the query string or a route param. A new endpoint inherits the check rather than having to remember it. That covers the most common case of failure three.
  - withAuthUser
  - ctx.var.organizationId
- **Migrations that run inside the release** The deploy command puts the migration in Railway's pre-deploy step or Fly's release_command, running in the image being shipped. A failed migration fails the release, so a new version never serves traffic against a schema it cannot use, and there is no step where anyone, the agent included, has to migrate production by hand. That narrows failure two.
  - release_command
  - pre-deploy
  - /ping
- **Types from the route to the screen** The frontend's client is generated from the backend's route types, so the miss from failure four is a compile error. The agent sees it in its own loop and fixes it before handing the diff back.
  - Hono
  - HyperFetch
  - typecheck

On top of that, auth, organizations with roles, and Stripe billing arrive as packs that were reviewed and tested once,
so the agent is not generating a login flow or a webhook handler from a prompt. It spends its attention on the part that
is yours.

## What it does not do

There is no sandbox, no approval step for the commands an agent runs, and nobody reviews the agent's code for you. Hype
Stack is a codebase on your machine, not a hosted guardrail. If you paste the production database URL into the agent's
environment, the template will not stop a destructive query, and backups are your database host's job (Railway, Neon or
whoever runs your Postgres, on their bill).

What you still write and check yourself:

- **Your features.** The workflow your product exists for, and the tests for it. The template ships testing conventions;
  your logic needs its own cases.
- **Environment separation.** A development database the agent can break and a production one it cannot reach.
- **The review.** Every diff that touches auth, billing or data access gets read by a person before it ships.

That is the trade. Vibe coding is not bad, but it moves the work from typing to reviewing, and a codebase built for an
agent makes the review smaller. The template, its packs and the install command are below.
