Guide
Runaway AI agent bill: stop the loop, then check the charge
The short answer: an agent that loops does not slow down by itself. It keeps paying for calls until a limit outside the agent stops it. 69 of the 656 public billing cases in our library mention a loop, a runaway or the same retry over and over, and 52 mention subagents, scheduled jobs or cron. Stop the process and auto-reload first, set a hard limit at the provider, and only then work out what you were charged.
For developers running Claude Code, the Agent SDK, Codex or any agent with an API key or extra usage turned on. If the agent only ever runs under a plan with no paid overage, a loop costs you quota, not money.
Stop it now: 4 steps
- 1
Kill what is still running. End the session, then look for child processes and background jobs it started. In one case the session stopped at its usage limit but the processes kept calling the API for about 17 hours (#100546).
- 2
Pause the schedule. Disable cron entries, scheduled tasks and hooks that relaunch the agent. One report describes recurring jobs built as full AI runs, about 580 runs a day, which used a 361.6M-token weekly allowance in 3.83 days and then $45.61 of paid overage (#110395).
- 3
Turn off auto-reload. A loop with auto-reload on can keep buying credit. In the largest case we hold, a Stop hook kept returning a block and the agent ran for six days, about $9,364 of extra usage through repeated auto-reload (#107256).
- 4
Set a hard limit outside the agent. OpenAI: a monthly organization or project spend limit with Enforce a hard limit on. Requests then return 429 with project_spend_limit_exceeded. Claude API: an organization or workspace spend limit in the Console. Requests over it return 400 and say when access resumes. Both providers say the limit can be passed slightly while it propagates.
How loops run away
| Shape | Public example | What stops it |
|---|---|---|
| A hook or check that never lets the run finish | A Stop hook keeps returning a block, six days of headless runs, about $9,364 (#107256) | A turn cap and a provider hard limit. A per-session cap did not exist in that setup. |
| Background processes outliving the session | 17 hours, about 59,000 API calls, about $2,000 after the session hit its limit (#100546) | Kill child processes. A cap on turns or calls in the test loop. |
| Subagents spawning subagents | Recursive subagents, about 800k tokens and a $27.60 usage-credits charge (#69578). Another issue reports over $600 burned in one session, and a comment on it reports 900+ agents and about $700 in roughly 30 minutes on Bedrock (#72732). | A spawn limit and a budget the agent cannot edit. |
| Scheduled jobs priced as full AI runs | 580 runs a day, allowance gone in 3.83 days, $45.61 overage (#110395) | Estimate runs per day times cost per run before you schedule anything. |
| A cap that did not hold | A $5 extra-usage limit, $12.52 charged, 250% of the cap (#59858) | This one is a billing question, not a loop. Keep the cap setting and the charge for a dispute. |
Then reconcile the bill
- 1
Write down the window: when the loop started, when you stopped it, and which key, project or workspace it ran under.
- 2
Export the bill or usage for those days and find the hour the spend jumped.
- 3
Count the calls in your own logs for the same hours. If the bill is far above what your logs show, that gap is the part worth disputing.
- 4
List every auto-reload charge in the window with its time and amount.
- 5
Keep the cap settings as they were. A limit you set that did not stop the spend is the strongest point you have.
The check-up reads your files inside your browser tab and sends nothing anywhere. It does not log in to your account and does not promise a refund.
FAQ · Runaway AI agent bill: stop the loop, then check the charge
My agent looped overnight. What do I do first?
Stop the spending before you look at the bill. Kill the process, pause any scheduled job that starts it, and turn off auto-reload so a loop cannot buy more credit. Then set a hard spend limit at the provider. In one public report a loop ran for six days and auto-reload kept firing, about $9,364 in extra usage (GitHub issue #107256).
Does stopping the session stop the spending?
Not always. In one report the session stopped at its usage limit, but background processes it had started kept calling the Bedrock API for about 17 hours, about 59,000 calls and about $2,000 (GitHub issue #100546). Check for processes and scheduled jobs that outlive the session.
Will a client-side budget flag stop a loop?
It helps, but it is an estimate. The Claude Code CLI reference says --max-budget-usd is checked against a client-side cost estimate that can differ from your bill, and spend can pass the cap. Pair it with --max-turns and a hard limit at the provider.
Can I get the money back after a runaway loop?
Sometimes, rarely in full. Of 656 public cases only 59 report an outcome and 12 of those got any money back. A loop you started yourself is the hardest case to win. A loop caused by a product defect, a duplicate charge or a cap that did not hold is easier to argue with a day-by-day reconciliation.
Sources
- GitHub #107256: Stop hook loop, six days, about $9,364 through auto-reload
- GitHub #100546: background processes ran 17 hours, about 59,000 API calls, about $2,000
- GitHub #110395: recurring jobs, 580 runs a day, $45.61 overage
- GitHub #69578: recursive subagents, $27.60 charge
- GitHub #72732: recursive subagents, over $600 in one session
- GitHub #59858: $5 limit, $12.52 charged
- OpenAI API docs: Spend limits
- Claude Platform docs: Rate limits and spend limits
Case counts on this page come from our research library of 656 verified public AI billing dispute cases (170 curated cases plus 486 collected on 2026-11-24). Counts are keyword counts over the case texts; one case can match more than one pattern.
Fireborn finds and stops surprise charges for free. If money is owed, it gives you a free appeal template to send yourself. Setting up a hard spend cap for you is a paid job on Upwork. It does not promise refunds or log in on your behalf. Figures on this page follow the sources cited. Last verified: 2026-11-26. By Fireborn (6hn68).