workerfuse

Workers AI runaway bills: how agent loops and retries add up

Workers AI bills in neurons. An agent loop or a retry that re-runs inference can spend more in an hour than your traffic does in a month.

Workers AI bills in neurons, $0.011 per 1,000, after a daily free allowance of 10,000. A million neurons is $11. How many neurons a call uses depends on the model and the tokens, so check the pricing page for yours.

In my experience the scary case isn't traffic. It's a loop. An agent that calls the model, doesn't like the answer, and calls it again. Or a queue consumer that runs inference, throws after, and retries the whole thing. Each retry pays for inference again.

Some cheap guards

  • Put a hard max on agent steps per request. Like, a literal counter.
  • Set max_tokens. Don't let the model decide how long to ramble.
  • Save the model output before the step that can fail, so a retry doesn't redo inference.

One annoying detail: Workers AI analytics don't say which script made the call. So workerfuse charges all Workers AI usage to every script with an AI binding. That overcounts if you have several, but I'd rather pause early than not at all.

Pause the runaway Worker. Keep the rest running.

workerfuse checks your Cloudflare spend every five minutes and pauses any Worker over its limit.

Start free trial

Keep reading

Cloudflare spending limits vs pausing one Worker

Cloudflare now has spending limits for Workers and Durable Objects. They're account-wide and block the whole product. Here's how that compares to pausing only the runaway Worker.

Cloudflare billing horror stories: four runaway bills from 2026

A $34,895 alarm loop, a $10,811 bill from an abandoned side project, a ~$36,000 queue loop, and $4,586 of D1 writes. What broke, how long it ran, and what Cloudflare did about it.

How a Durable Objects alarm loop runs up your Cloudflare bill

A Durable Object alarm that keeps rescheduling itself racks up requests, storage writes and duration. What that costs at list price, and how to stop it.