You built an app with Lovable, Bolt, Replit, Cursor or Claude Code. It worked. Then a few prompts later, things started breaking: fixing one bug creates two more, the build fails, or it works on your laptop but not in production.
This is one of the most common stories in vibe coding, and the good news is that you rarely need to start over. Here is what to do when you find your vibe coded app broken and need it back under control. It comes from client work at our SaaS marketing agency, where developers are on the team.
Why vibe-coded apps start breaking
- No tests. Nothing tells you when a change breaks something that used to work.
- Patch on patch. Each prompt fixes the symptom in front of it, so the same logic ends up copied in several places.
- Lost context. As the project grows, the AI no longer sees the whole codebase and starts contradicting earlier decisions.
- Hidden configuration. Environment variables, database rules and build settings differ between preview and production.
Step 1: Stop prompting and save what you have
With a vibe coded app broken like this, every new prompt adds risk. Pause, and make sure the project is in Git (GitHub, GitLab or similar) with a commit for the current state. If an older version worked, find that commit too. You now have a safe point to return to.
Step 2: Reproduce one problem at a time
If you have a vibe coded app broken in several places, write down the exact steps that trigger each bug and what you expected instead. Pick the most important one, usually whatever blocks users from signing up, logging in or paying, and focus only on that.
Step 3: Read the real error
Check the browser console, the server or function logs and the build output. The first error in the chain usually matters most; later errors are often side effects. Copying the full error, not a summary, makes the fix far easier for a human or an AI.
Step 4: Find the root cause, not the symptom
Ask why the error happens, then why again. A missing environment variable, a database rule, a renamed field or two components fighting over the same state are typical root causes. Fixing the cause once is better than adding another workaround.
Step 5: Add tests around what matters
Before changing more code, add a few automated tests for your critical flows: sign up, log in, the main action users pay for. They do not need to be perfect. Their job is to shout when a future change breaks something.
Step 6: Clean up in small steps
- Remove dead code and duplicate functions.
- Move repeated logic into one shared place.
- Give files and functions clear names.
- Commit after each small step so you can roll back.
Step 7: Make production match development
List every environment variable, secret and external service your app needs, and make sure production has the right values. Our guide on how to secure Supabase app projects covers where secrets belong. When you see a vibe coded app broken only in production, the cause is often configuration, not code. Still stuck? Get a free code review.
Step 8: Help your AI tool help you
If you keep using AI to build, give it guardrails: a short project guide that explains the structure, rules files for your tool (for example a CLAUDE.md file for Claude Code or rules for Cursor), and the tests from step 5. The AI will make fewer contradictory changes.
When to bring in a developer
Call for help if the app handles payments or personal data, if you have been stuck on the same bug for days, or if each fix creates new problems. An experienced developer can usually stabilise a vibe-coded app far faster than a rebuild, and leave you with code you can keep building on with or without AI. Our application support and maintenance services can keep it running after that. Get a free code review.
Questions about fixing a vibe-coded app
Do I need to start over if my vibe-coded app is broken?
You rarely need to start over. Most AI-built apps can be brought back under control by saving what you have, fixing one problem at a time and adding tests around the flows that matter most.
Why do vibe-coded apps start breaking?
The usual causes are missing tests, patch on patch fixes, the AI losing context as the project grows, and hidden configuration that differs between preview and production.
What should I do first when my AI-built app breaks?
Stop prompting and make sure the project is in Git with a commit for the current state. If an older version worked, find that commit too, so you have a safe point to return to.
Why does my app work locally but fail in production?
Many of these bugs are configuration, not code. List every environment variable, secret and external service your app needs, and make sure production has the right values.
When should I bring in a developer?
Call for help if the app handles payments or personal data, if you have been stuck on the same bug for days, or if each fix creates new problems.
Stuck with a vibe coded app broken beyond a quick fix?
We fix vibe coded app projects built with Lovable, Bolt, Replit, Base44, Cursor and Claude Code. Free code review, fixed quote, NDA on request.
Get a free code review
Leave a Reply