Replit Agent is stuck and running up charges: how do I stop it and get my app working?
Short answer: Stop the run, set a spending limit, then look at what each step cost before you try again. Replit Agent is the AI helper inside Replit, an online tool where you describe an app and it writes and runs the code. Replit's docs say you can cap spending in Usage settings and that usage-based services are blocked once you hit the limit. If the same problem comes back three times, stop paying for retries and hand the code to a person.
Agent keeps working, keeps failing and keeps charging, and you need to stop the money first and the loop second.
I'm Ranjit, and I run Blur Studio: 15+ years building software, 120 apps taken live, and clients who have gone on to raise $10M+. I build AI systems and processes that help businesses do a lot more with a lot less time. I also work differently from most of what else is out there, more on that further down this page. Say hello.
When an AI agent loops, two problems happen at once: your app is not getting fixed, and your credits or card are going down. Fix them in this order. First stop the spending. Then protect your work. Then decide, calmly, whether to keep going or hand the project over. This page walks through each step using Replit's own documentation.
Step 1: Stop the spend in the next five minutes
- Stop the current run. If Agent is still working on a request, stop it. A loop that keeps retrying is the most expensive thing you can leave running overnight.
- Open your Usage page. Replit's docs say Usage shows where credits go and updates in near real time, and you can filter by date, project and member. Look for the project that is burning credits. In the Agent tab you can also hover over the usage icon to see the cost of individual checkpoints (a checkpoint is a saved step of finished work).
- Set a usage limit. In Settings, Usage, choose Manage limits. Replit says usage limits cap spending beyond your monthly credits, and a service shutdown limit suspends services until you raise the budget or the next billing cycle starts. This is the single most useful setting for a stuck-agent problem.
- Set alerts. Replit lets you set email notifications at spending amounts you choose. Pick a number that would make you wince, then set an alert at half of it.
- Turn off auto-reload if you use credit packs. Credit packs are prepaid blocks of credits for Core and Pro plans. If auto-reload is on, a loop can buy a new pack each time your balance runs low. You can turn it off in Billing.
Note that Replit says usage data can take up to 30 minutes to appear on the dashboard, so check again after a while rather than trusting one number.
Agent pricing is effort-based, so a complex request costs more than a small one, and only your own account shows what your run cost. Look at the checkpoint cost there. If your charges look wrong or you were billed for a failed run, contact Replit support with the dates and the project name.
Why Agent gets stuck
"Stuck" covers several different problems. Knowing which one you have changes what you do.
- A real loop. The agent tries a fix, hits the same error, tries a similar fix, and repeats. The cause is usually that the problem is something it cannot see: a missing secret, a wrong setting, a database mismatch.
- A vague request. "Make it work" gives it nothing to aim at. It wanders.
- The app works in the editor, not when published. Replit's docs are clear that if Preview is broken, publishing will not fix it, and that secrets you set in the editor do not automatically carry to your published app. These are setup problems, not code problems.
- A slow startup. Replit's docs say its health check can fail if your home page takes more than five seconds to respond.
- Too much in one request. A large change with many moving parts is likelier to go off the rails than three small ones.
Step 2: Protect your work before you retry
Replit saves checkpoints as Agent works. According to its docs, a checkpoint captures your files, installed packages, settings, the conversation, and (if you choose) the database. You can roll back to an earlier one, and roll forward again if you went too far.
Rollback cautions that save people
- A rollback removes everything built after that checkpoint, including code edits. Make sure the checkpoint you pick is the last one that actually worked.
- By default a rollback does not change your database. You can choose to include the development database. Rolling back your production database is not done by rollback at all: Replit's docs say to use its point-in-time restore instead. If real customer data is involved, do not guess. Read that page or ask for help first.
- Replit's docs say Agent cannot change the production database, only the development one. Changes to the structure of the development database are applied to production when you publish.
Also copy your code somewhere you control. Replit supports Git, a system that stores your code and its full history in a repository, for example on GitHub. My guide on how to export code from an AI app builder explains the steps and the traps. Do this before any big rollback.
Step 3: Cheaper ways to keep going if you want to
If the app is close and you want one more attempt, change how you ask rather than just asking again.
- Use Plan Mode first. Replit's docs call this one of the most effective ways to save money: Agent writes a plan without changing code, and planning conversations use fewer tokens than code generation. Plan Mode is available on Core and Pro plans, not Starter. In the paid path it can still use credits, so it is cheaper, not free.
- Use Free Mode for everyday work. Replit describes it as no-cost everyday Agent work within your plan's allowance. Save Power or Max for the hard parts.
- Ask for the smallest fix and a way to check it. Replit's own troubleshooting page suggests prompts like "Fix the smallest issue first and tell me how to verify Preview works before publishing."
- Paste the exact error. Copy the message from the logs tab rather than describing it. Replit's page suggests asking Agent to say whether the issue is a command, dependency, secret, port, build or app error.
- One change per request. If it fails, you know which change did it.
Step 4: When to hand the project to a developer
Here are the triggers I use. Any one is enough.
- The same error has returned three times after three different fixes.
- You have spent more on retries than a fixed-price fix would cost.
- The problem touches money, logins or customer data.
- The app works in Preview but breaks when published, and you have already checked secrets, ports and logs.
- You are scared to click anything because the last click broke something.
A developer reads the code and the logs together, which the agent does not do well in a loop. For what to expect, see how to hire a Replit developer. If you are weighing other tools, Replit alternatives compares them. And why AI-built apps break explains the patterns behind most loops. For the specific question of whether AI can finish it at all, read can AI finish a half-built app or do you need a developer.
What to send so the first look is quick
- A link to the repository, or an export of the project.
- The exact error text and when it appears.
- What the app should do, in a few sentences.
- Which checkpoint last worked, if you know.
- Your Usage page screenshot, so the developer sees what Agent was doing.
Share logins securely, never in email or chat. And ask for a fixed price in writing.
How I'd approach this
I would stop the run, set a hard spending limit tonight, and sleep. In the morning I would look at the Usage page, find the last checkpoint that actually worked, and copy the code to Git. The same pattern in other tools is covered in how to stop the AI fix loop.
Then I would give Agent exactly one more try, in Plan Mode, with the exact error pasted in. If that plan does not name a clear cause, I would stop. A plan that says "let me try some things" is a loop with better manners.
After that, hand it over. Blur Studio fixes start around $1,500, so compare that with what your retries have cost so far, counting your own time. I would also ask the developer to set up a separate test copy before any further changes, so the next AI edit cannot break the live app. My guide on making a vibe-coded app production ready covers that.
Questions people ask
How do I stop Replit Agent from charging me?
Stop the current run, then open Settings, Usage and choose Manage limits. Replit's docs say a usage limit blocks usage-based services until the next billing cycle or until you raise it. Also turn off auto-reload if you use credit packs, and set an email alert at a lower amount so you hear early next time.
Why is Replit Agent stuck on working or thinking?
It can be a real loop, a request that is too big or vague, or a setup problem such as a missing secret. If Preview works but publishing fails, Replit's troubleshooting guide says to check logs, run and build commands, production secrets, and port settings. Ask Agent to explain the cause in plain words before it changes anything.
Does rolling back a checkpoint undo my database changes too?
Not by default. Replit's docs say rollbacks do not change your database unless you select the database option, and the production database is not restored by rollback at all. Read Replit's page on development and production databases before you touch live data.
Will Replit refund credits for a stuck run?
Check Replit's current billing and refund terms, and contact its support with your project name and dates. Do not assume a refund. The safer plan is to set a limit and alerts so a loop cannot run up a large bill in the first place.
Is Plan Mode really cheaper?
Replit's docs say it lowers token costs because planning uses fewer tokens than writing code, and it lets you fix the scope before any work starts. In the paid path Plan Mode can still use credits, so treat it as cheaper, not free. It is available on Core and Pro plans.
When should I stop trying and hire someone?
When the same error returns three times, when the issue touches payments, logins or customer data, or when your retry spend is close to a fixed-price fix. See how to hire a Replit developer for what to ask and what to send.
More in this topic: Problem solving: AI-built and no-code apps (26 guides) →