DEV Community

Bobi
Bobi

Posted on

Vibe coding stuck? How to get your app back when the AI breaks it

You asked the AI for one small change. Now the whole app is broken, the AI keeps "fixing" it, and every fix makes it worse.

This is the moment most first apps die. Not because the idea was bad, but because the builder panics and starts over. You don't need to. Here is what I do, in order, every time.

1. Stop asking for fixes

Each new "please fix it" message adds more changes on top of a broken state. After three rounds, nobody (you or the AI) knows what changed.

So stop. Don't send another fix request until you've done step 2.

2. Go back to the last version that worked

This is the single most useful habit in AI coding: save a working version before every change.

  • In tools like Lovable, Bolt or Replit, open the version history and restore the last version where the app worked.
  • If you use Claude Code or Cursor with git, ask: "Show me the last commit where the app worked and restore it."

If you never saved a version, start doing it today. Before every change, say: "Save this as a checkpoint called before-login-page." It costs ten seconds and it is your undo button.

3. Describe what you see, not what you think is wrong

Beginners write: "The database is broken, fix the database."

The AI then rewrites the database code, which was probably fine.

Write what you actually see instead:

When I click "Save", nothing happens.
I expected the task to appear in the list.
No error on the page.
This started after you added the login page.
Enter fullscreen mode Exit fullscreen mode

Four lines. What you did, what you expected, what happened, and when it started. That last line is gold: it tells the AI where to look.

4. Give the AI the error message, word for word

If there is a red error anywhere (on the page, in the browser console, in the terminal), copy it exactly and paste it. Don't summarise it. "Some error about undefined" is useless. The full message usually names the exact file and line.

To find browser errors: right-click the page, choose Inspect, then the Console tab. Copy anything red.

5. Ask for one small change at a time

"Add login, a settings page and dark mode" is three changes. If one breaks, you won't know which.

Ask for one thing. Check it works. Save a checkpoint. Then the next thing. It feels slower. It is much faster.

6. If you're still stuck, ask the AI to explain before it changes anything

Try this:

Don't change any code yet.
Explain in plain words why clicking "Save" does nothing.
List the 2 most likely causes.
Enter fullscreen mode Exit fullscreen mode

Now you're working with the AI instead of watching it guess. Pick the cause that sounds right, then ask it to fix only that.

7. Know when a fresh chat helps

Long conversations confuse AI tools. After 30 or 40 messages, the AI starts forgetting what it built earlier.

Open a new chat, paste a short summary ("This is a to-do app. Tasks save to the database. Clicking Save stopped working after we added login."), and continue from there. It often fixes in one message what the old chat couldn't fix in ten.

The short version

  1. Stop sending fix requests.
  2. Restore the last working version.
  3. Describe what you see, not your guess.
  4. Paste the exact error.
  5. One change at a time, with a checkpoint before each.
  6. Ask for an explanation before a fix.
  7. Start a fresh chat when the old one gets long.

Getting stuck is normal. Every app I've built with AI broke at least once. The people who finish are not the ones who never get stuck. They're the ones who know how to get unstuck.


I wrote a short guide that walks you through building and publishing your first app with AI in one weekend, including the exact prompts I use when things break: Live by Sunday. Chapter 1 is free.

Top comments (0)