DEV Community

shinertx
shinertx

Posted on

Why your OpenClaw bill is 10x what you expected (and how to find the culprit in 30 seconds)

You set up OpenClaw. You ran it on a task. You came back to a billing email you didn't expect.

This is the most common story in r/openclaw right now. One developer burned $200 in a single day. Another hit $3,600 in a month. In almost every case, the post-mortem reveals the same three culprits.

The Three Silent Killers

1. The Retry Storm

When OpenClaw hits a 429 rate limit error, it doesn't stop. It retries — usually with exponential backoff: 5 seconds, then 10, then 20, then 40. Each retry re-sends the full conversation context. So not only is it retrying, it's retrying with a growing payload.

A session that hit 5 retries before succeeding might have cost 8x what a clean run would have cost.

You won't see this in your billing dashboard. You'll just see "a lot of tokens."

2. Context Accumulation

This one is structural. Every message in a multi-turn session re-sends everything before it.

  • Turn 1: ~800 tokens
  • Turn 10: ~12,000 tokens
  • Turn 20: ~38,000 tokens
  • Turn 40: ~148,000 tokens

A 40-turn OpenClaw session can cost 50x what a 10-turn session costs, for the same amount of useful work. Context accumulation typically accounts for 40–50% of your total bill.

3. The Looped Tool Call

The agent called a tool, got an unexpected result, decided to try again, got the same unexpected result, and tried again. Indefinitely, or until it hit a token limit.

This one is the most unpredictable — it depends on the model's judgment about when to give up. Some models are much more persistent than others.

How to Find Your Bad Run

I built a tool for exactly this: npx vibe-billing scan

It analyzes your agent's request logs and identifies:

  • Which session or run accounted for the most spend
  • Whether retry patterns are present
  • Whether context is growing unusually fast
  • Whether any tool calls are looping

No account required. No data leaves your machine. It runs locally against your own logs.

npx vibe-billing scan
Enter fullscreen mode Exit fullscreen mode

If you want to instrument future runs and catch problems before they hit the bill:

npx vibe-billing setup
Enter fullscreen mode Exit fullscreen mode

This installs a local proxy that sits between your agent and the API, tracking spend in real time with circuit breakers for loops and configurable token budgets per run.

What I've Seen

Running this on my own agent setup:

  • $7,691 in spend tracked and attributed
  • 947 million tokens intercepted
  • 161 retry loops blocked before they escalated

The biggest single waste event I've caught was a 40-turn session where the agent was trying to parse a malformed API response. It retried 12 times before giving up. Each retry re-sent 80,000+ tokens of context. Total cost of that one failure: $47.

The fix was a one-line change to the error handler. But I never would have found it without the scan.


If you've had an OpenClaw run that went sideways, I'd genuinely like to know what the failure mode was. Drop a comment or try the scan and share what it finds.

npx vibe-billing scanhttps://api.jockeyvc.com

Top comments (0)