AI agent runaway cost calculator

Last updated 25 November 2026

What does an AI agent cost when it gets stuck in a loop and nobody notices? Each step of an agent loop sends the whole conversation again, so every step costs more than the one before. Pick a model and how long the loop could run, and see the bill.

Uses the same prices Xpenvo Agents charges budgets with, checked every 6 hours (see AI model prices). Nothing you type leaves your browser.

$5,799

for 27,900 steps of claude-sonnet-5-5. The first step costs $0.0480; by the end each step costs $0.21, about $94 an hour.

The context stops growing at 100K tokens, where most frameworks start trimming old messages. Raise it to see an agent that keeps everything.

If it runs forIt costs
1 hour$89
A working day (8 h)$744
Overnight (14 h)$1,306
A weekend (62 h)$5,799
A week (168 h)$15,720

the loop is stopped after 117 steps, and the bill is $20 at most instead of $5,799.

Why loops get expensive so fast

How to stop it

Xpenvo Agents checks what each request could cost before it is sent, and refuses it when it would go over the agent’s budget. It also spots an agent sending the same thing again and again, can ask a person to approve an unusually big request, and has a kill switch for every agent at once. You keep your own provider key; setup is a new base URL and one header.

Join the free beta Try the demo

Read more: How to stop runaway agent loops.

Assumptions

Standard (not batch or priority) prices, in US dollars. Long-context prices apply once the context passes the model’s long-context threshold. Cache writes are not counted, so a real bill with caching can be a little higher. Your own discounts are not included.