How to fix a vibe-coded app that's stuck
We took a stuck vibe-coded app and fixed it with about 17 minutes of agent time. How to find what's broken, when to stop prompting, and what it all cost.
Rumeysa Sağlamon 
If your vibe-coded app mostly works but every new prompt seems to break something else, the fastest way out is usually to stop prompting and roll back to the last version that worked. From there, fix one failing flow at a time, with the exact problem written down, and ask the agent to explain the code before it changes anything.
To see how that holds up on a real app, we took an open-source expense tracker that someone had built with an AI tool and left on GitHub. Its type check failed in several files, and once we imported it, the preview wouldn’t load at all. With about 17 minutes of agent time and one small change made by hand, it was working again, and every example in this post comes from that run.
This post is for anyone who built most of an app with an AI tool, ours or someone else’s, and hit a wall before it was finished. It’s a frustrating place to be, because the app is so close and the agent sounds just as confident on its fifth attempt at a fix as it did on its first.
Common vibe coding problems that leave an app stuck
Stuck apps usually aren’t broken in one big way. They’re broken in a few small ways that pile on top of each other, and the app we tested was a good example. The bundler couldn’t find one of its packages, the type check failed in several files, it had three chart libraries installed with one of them abandoned halfway and its imports commented out, and one number on the dashboard was wrong by design. None of those would have stopped a developer for long on its own, but together they meant the app didn’t open.
An AI agent works from the files it reads and the description you give it. When a fix doesn’t work, the next prompt usually adds code on top of the failed attempt instead of removing it, so after a few rounds there are three half-fixes in the codebase and none of them are doing what you asked. Another broad prompt like “it’s still broken, please fix” rarely helps, because it gives the agent less to go on than it had the first time.
Step 1: Roll back to the last version that worked
Before you change anything else, go back to the last point where the broken flow worked, or where the app was in better shape overall. Most AI builders keep some kind of history, and if your project is in Git, every commit is a save point you can return to. Rolling back can feel like losing work, but you’re really only losing the failed attempts, and you keep everything you learned from them.
If nothing in the history worked, pick the version where the problem was smallest, since that’s the one that’ll be easiest to explain.
Step 2: Narrow it down to one failing flow
A flow is one thing a user does from start to finish, like signing up, adding an item, or checking out. Pick the one that matters most and write down four things before you open the chat:
- What you did, step by step, so someone else could repeat it.
- What you expected to happen.
- What happened instead.
- The exact error text, copied from the screen, the browser console, or the logs.
Once our expense tracker was running, the charts filled in and the totals added up, but the “vs Last Month” card was wrong. Written down, it looked like this:
- We added four expenses this month, with nothing in last month.
- We expected the card to say there was nothing to compare with yet.
- It showed +100.0%, which it had also shown before we added anything.
- There was no error at all.
That last line is worth noticing. When there’s no error text, the app isn’t crashing, it’s calculating something wrong, and that usually means the agent needs to read the logic rather than chase a message.
Step 3: Ask for an explanation before a fix
Before the agent touches anything, ask it to read the code end to end and tell you where the data goes. That often surfaces the real problem, like two places writing the same value or a fallback that kicks in when it shouldn’t. If your tool has a read-only or planning mode, use it here, so the agent can’t change files while it’s explaining. This is the prompt we used, built from the four lines above:
Prompt
When I add expenses this month and there are none last month, the "vs Last Month" card shows +100.0%. I expected it to say there's nothing to compare with yet. It showed the same +100.0% before I added any expenses. Don't change any code yet. Explain how this percentage is calculated, file by file, and tell me the smallest fix.
In our run, the agent traced the flow from the form where you add an expense to the card on the dashboard, and found that the dashboard used 100 as a fallback whenever last month’s total was zero. That took 18 seconds. Once you have an explanation like that, ask for the one small change it describes and test it before you ask for anything else, which keeps the next failure easy to spot. Our fix took another minute and a half, and the card now says “Nothing to compare with yet”.
Step 4: Start a fresh thread, or try a different model
Long threads drift. A long conversation carries every failed attempt along with it, so the agent can keep steering back toward an idea that already didn’t work. Starting a new thread with your four lines and the explanation from Step 3 gives it a clean start. If you have access to more than one model, try the other one on the same problem, since different models read code differently and one may spot what the other missed.
We didn’t need this step for our app, because the explanation found the cause on the first try. It’s the next thing we’d reach for if it hadn’t.
Step 5: Decide how to finish it
At some point it’s worth deciding on purpose whether to keep going the same way. These are the realistic options, from cheapest to most hands-off.
| Option | What it costs | Best for | Not ideal for |
|---|---|---|---|
| Keep prompting, one flow at a time | Your time and AI usage | One or two clear bugs you can describe exactly | State that’s tangled across many files |
| Fix it by hand | Your time | Small, precise changes like a style, a label, or a wrong field | Anyone who can’t read the code yet |
| Rebuild one flow from a clean start | Your time and AI usage | A flow that’s been patched so often nobody can follow it | Apps where the backend itself is the problem |
| Hire someone to untangle it | Money | Architecture, a custom native module, a data migration, or a security review | A single bug you could describe in one prompt |
Our app needed two of these. The percentage bug spanned several files, so it suited the agent, while the last problem (a floating button covering the bottom of a list) was a spacing fix we could point at, so we made it by hand in a few seconds.
We’d rather tell you honestly that some problems need engineering judgment instead of another prompt. If you’ve been through the steps above twice and the same flow keeps breaking, that’s usually a sign the problem is in how the app is structured, not in the last line of code the agent wrote.
How we got the app working in Draftbit
All of the code that Draftbit produces for mobile apps is based on React Native and Expo, and the app we tested was an Expo app, so it could come in with the full builder. This section covers the parts of the run the steps above skip over, with what each one cost.
Bringing the app in
If your app is in a GitHub repository or a zip file, you can import it by starting a new project with Continue an existing app and choosing Import. Expo, Vite, Astro, and Hono apps get the full builder, while other JavaScript frameworks such as Next.js, Remix, or Express keep their setup and get chat, code editing, and a preview. You can point the import at a public or private repository, a folder inside it, and a branch, and the code is copied into a new project, so it doesn’t stay linked to the original repository.
The choice that matters most is how to import it, and you make it once for each project:
- Import & migrate to Draftbit conventions gives you the full builder, including the visual editor. The agent writes a migration plan first, and nothing changes until you approve it.
- Import & preserve existing setup keeps your code as it is, apart from a small preview setup that’s removed when you export. You get chat, code editing, and a preview.
We chose to migrate, because we wanted the visual editor later on. The agent read the project and the preview logs, found the package the bundler couldn’t resolve, and wrote a plan that fixed the preview first and then upgraded Expo one SDK version at a time. Writing the plan took 56 seconds and 231 credits.
Once we approved it, the migration ran for 14 minutes and 21 seconds and used 3,395 credits. By the end the type check passed, lint reported no errors, all five tabs loaded, and the production export passed for web, iOS, and Android. One thing didn’t come along, and it’s worth knowing before you import your own app: the original kept its expenses in the browser’s local storage, so the code moved over but the old records didn’t. The agent explained how to copy them across if we wanted them.
The percentage bug, in a Read Only thread
For Step 3 we used a Read Only thread, which lets the agent read and explain the code without changing any files. The explanation took 18 seconds and 99 credits, and the agent finished by asking us to switch modes before it made the change, which is exactly what Read Only is there for.
We switched the same thread to Auto mode (the agent called it Normal mode) and asked for the smallest fix it had described. That took 1 minute and 25 seconds and 189 credits, and the agent checked the card in the light and dark previews before it finished (when the preview server refused a connection along the way, it restarted it and checked again).
The overlap, fixed by hand
The floating + button covered the amount on the last expense in the list, so we selected the dashboard’s content view in the visual editor and added pb-24, which puts 96 px of padding at the bottom so the last row can scroll clear of the button. It took a few seconds and no credits.
If you’d rather have the agent do it, a prompt like “Add enough bottom padding to the Dashboard’s scroll content so the + button doesn’t cover the last row” describes the same change. We made this one by hand, so we didn’t run that prompt.
What it took
| Step | Time | Credits |
|---|---|---|
| Writing the migration plan | 56 s | 231 |
| Running the migration | 14 min 21 s | 3,395 |
| Explaining the +100.0% bug (Read Only) | 18 s | 99 |
| Fixing it | 1 min 25 s | 189 |
| Fixing the overlap by hand | A few seconds | 0 |
| Total | About 17 minutes | 3,914 |
We ran all of this on Draftbit credits. The migration is the expensive part, but it only happens once, and the bug fix after it cost under 300 credits. You can also run the same threads on the Claude or ChatGPT subscription you already pay for. That works on every plan, Free included, where it covers 20 agent runs a week, and threads on your own subscription don’t use Draftbit credits. Editing the code directly in the builder starts on the Standard plan at $15 a month.
If you’d rather hand it over, Draftbit Experts take on this kind of rescue work. They start with a code review to find what’s actually broken, fix it, and hand back an app you understand. Rescue projects are scoped at 2 to 6 weeks, and the app doesn’t have to be in Draftbit for them to work on it.
What to do next
Pick the one flow that’s broken, write down the four lines from Step 2, and roll back to the last version where it worked. If you’d like to keep going in Draftbit, import the app and start with a Read Only thread, or tell us where you’re stuck and a real person will reply with a next step.