Forty-seven thousand dollars. That's what one team reportedly woke up to after their AI agents got stuck in a loop — for eleven days — while everyone assumed the system was running fine.
Two agents. Talking to each other. Non-stop. And the worst part? Every individual API call looked completely healthy. Sub-200 milliseconds. Under token limits. Proper logging. The bug wasn't in any single message. It was in the conversation.
This is what I'm calling The Token Spiral — and if you're building with AI agents right now, you need to understand it before it hits your account.
How We Got Here
AI billing used to be simple. You called an API. You got a response. You paid for the tokens. Input plus output times your rate.
But agents changed everything. An agent doesn't just call an API once. It reasons. It plans. It calls tools. Those tools return data. The agent re-plans. Calls another tool. Summarizes. Verifies. What started as one API call becomes — in one documented case — 47 calls for a single user task.
The cost isn't linear. It spirals. Each step adds context. Context means more input tokens on the next call. And if something goes wrong — if an agent gets confused, or two agents start "clarifying" each other's outputs — that context keeps growing. With no built-in kill switch.
The Scale of the Problem
This isn't just indie devs getting burned. Analytics Week recently reported that Fortune 500 companies have collectively leaked $400 million in unbudgeted AI spend — what they're calling the "Predictability Gap."
And Gartner's prediction? Over 40% of agentic AI projects will be cancelled by the end of 2027 — due to escalating costs, unclear business value, or inadequate risk controls.
A widely-shared post-mortem describes how this can play out. Four LangChain agents. A research workflow. Week one: $127. Week two: $891. Week three: $6,240. Week four: $18,400.
By the time they reportedly pulled the plug, they'd burned through forty-seven thousand dollars. And every monitoring tool they had said the system was fine.
The Blind Spot
Traditional monitoring watches individual requests. Latency. Token counts per call. Error rates. But when two agents have a valid 200-turn conversation about edge cases in your data — every individual message looks healthy. The loop is invisible until the invoice arrives.
And here's what changed in 2026: GPT-5.4 and Claude 4.6 gave agents massive new context windows and cheap tool-calling. One extra research loop that used to cost pennies now burns $8–$15 per cycle. Vendors added the horsepower — they still hadn’ added the off-switch.
5 Guardrails to Stop the Spiral
These aren't guarantees — your setup is different. But these are the patterns people who've been burned are using.
1. Session Token Budgets Set a maximum token budget per task, not per call. When you hit that budget, the session ends. Period. 50K–100K tokens is a reasonable ceiling for most workflows.
2. Step Limits Never let an agent run for more than 10–20 steps. If it hasn't solved the problem in 15 steps, it's not going to solve it in 50 — it's just going to burn tokens trying.
3. Daily Cost Alerts Set up alerts at 50% and 80% of your daily budget. Not monthly — daily. A $4K day one should trigger a fire alarm.
4. Model Routing Route 70–80% of your agent's operations to a cheap model. Memory enrichment. Retrieval classification. Routine planning. Save your expensive model for final synthesis only. One developer cut their bill from $180/month to $70/month with this single change.
5. Human Approval Gates For any agent action that exceeds a cost threshold — say $10 in projected spend — require approval before it runs. This is the "are you sure?" prompt for AI.
The Bottom Line
AI agents are real. They're useful. The infrastructure to govern them doesn't exist yet.
The vendors ship autonomy. They don't ship kill switches. They don't ship budget caps. They don't ship loop detection. That's your job.
The Token Spiral is real. The patterns to stop it exist. But nobody's going to implement them for you.
If you want vendor changes, pricing shifts, and policy fine print flagged before they hit your account, subscribe to the newsletter.

