I want to tell you about the day I lit a week’s worth of budget on fire, because it taught me something that almost nobody selling AI will tell you, and it is one of the most important things to understand before you put any of this into a business.

It went like this. I set an AI agent to work on a task, the kind of thing that is supposed to run on its own while you do something else, and I walked away. That is the whole pitch of an agent, after all. It works while you don’t. When I came back, the task was half done and the budget was most of the way gone. The agent had hit a small snag, and instead of stopping, it had tried again. And again. Each attempt dragging the entire history of everything it had already done back through the model, paying full freight for the same pile of context every single time, getting a little more lost with each pass. It had been busy. It had been expensive. It had not been working.

Here is the part that matters. The model was cheap. The thing I was paying per call was priced in fractions of a cent. What was expensive was the structure I had wrapped around it, or rather the structure I had failed to wrap around it. And that gap, between a model that costs almost nothing and a bill that made me wince, is the whole subject of this article, because that gap is not a quirk. It is the entire economics of running AI in a business, and getting it wrong is one of the most common and most avoidable ways these projects go sideways.

The meter doesn’t add up. It multiplies.

Let me explain the mechanism plainly, because once you see it you cannot unsee it, and you will start asking much better questions about any AI someone proposes to build for you.

A single AI request is genuinely cheap. The trouble is that an agent is never a single request. It is a loop. It thinks, it acts, it looks at the result, it thinks again, step after step toward a goal. And in the naive way these things are built, every step sends the whole accumulated history back to the model. Step one is small. By step twenty you are paying to re-process everything from the previous nineteen steps, every time, on top of the new work. The cost of each step is not flat. It climbs as the conversation grows, so a long run doesn’t cost you a line, it costs you a curve. You are not paying for the work. You are paying, over and over, for the agent to re-read its own diary before adding one more sentence to it.

Now add the failure mode I walked into. If the agent hits an error and isn’t told to stop, it retries. If the retry also fails, it retries again. An agent with no circuit breaker can spin on the same broken step for hours, each spin fully billed, producing nothing. This is not a rare horror story. It is the default behaviour of an unsupervised loop with no guardrails, and the numbers it produces are genuinely startling.

This is not just my embarrassing afternoon

I went looking, after my own small fire, to see how bad it gets at scale, and it gets much worse than a torched week.

In one widely reported case, a set of AI agents entered an infinite loop and ran for eleven days before anyone caught it, producing a bill of around $47,000. In another, an agent kept spinning up duplicate cloud infrastructure every time it hit an error and ran up a $6,531 bill doing it. A developer described leaving an agent running over a long weekend and coming back to a $4,200 bill, which is, more or less, exactly my story with another zero on it. At the extreme end, one engineer ran roughly a hundred agent instances that generated over 603 billion tokens and 7.6 million requests, for more than $1.3 million in a single month.

Look at what every one of those has in common. None of them is a case of the model being priced unfairly. Every one is a structure problem. A loop with no stop condition. An error path that retried instead of halting. Context that piled up and got re-billed on every pass. The model was the cheap, blameless part. The architecture around it was the bill.

The same task, ten times cheaper

Now the encouraging half, because this is not a “therefore AI is too expensive” story. It is the opposite. The reason the runaway numbers are so alarming is also the reason the savings are so large: cost in AI is almost entirely a function of how the thing is built, which means it is almost entirely within your control.

Take the single biggest lever, the one that fixes the exact problem that burned me. Most of what an agent resends on each step is identical to the last step, the same instructions, the same reference documents, the same setup. There is a technique called prompt caching that says, in effect, stop paying full price to re-read the parts that never change. On Anthropic’s models, a cached read costs $0.30 per million tokens against $3.00 for fresh processing, a 90% discount on the repeated material. Teams that organize their systems around this routinely cut real-world token costs by 70 to 90%. That is not a rounding error. That is the difference between a project that pencils out and one that doesn’t, and it comes entirely from how the system is structured, not from which model you picked.

Then stack the rest of the unglamorous engineering on top. A hard token budget per agent, so it physically cannot exceed a number you chose. A circuit breaker that kills a loop the moment it stops making progress, so an error becomes a stop instead of a spiral. Scoping, so the agent is handed the two paragraphs it needs instead of the fifty-page document it doesn’t. Real-time visibility into spend, so you find out on a dashboard in the first minute, not on an invoice at the end of the month. None of this is exotic. All of it is the sort of thing that gets left out when something is thrown together fast to look impressive, and put in carefully when something is built to actually run.

That is the line I want to underline. The same task, the same model, can cost ten times more or ten times less depending on nothing but the quality of the structure around it. The model is roughly the same price for you as it is for your competitor. The bill is where the engineering shows up.

Why I’m almost glad it happened

I am not embarrassed by my expensive afternoon anymore, because it sharpened something I now consider central to how we work. The cost of an AI system is not a fact about AI. It is a fact about the build. A torched budget is just bad architecture made visible, the same way a noisy engine tells you something about the engine and nothing about gasoline. When someone shows you a frictionless AI demo and quotes you a price, the question that demo cannot answer is the one that actually decides whether this is a good idea: what does it cost to run, every day, once real input is flowing through it and nobody is watching it every second?

This is the same theme I keep coming back to from different angles, that the easy surface of AI hides the engineering that makes it trustworthy, which I wrote about in why AI is not the one-click tool it’s made to look, and that the question worth asking of any AI is whether it actually pays, which I went through in telling AI hype from real ROI. Runaway cost is just one more place the same truth surfaces. The model is the commodity. The structure is the product.

How we build, after the fire

When we put AI into a business at Entoura, the cost structure is a design decision we make on purpose, at the start, not a surprise we discover at the end. We cache the parts that repeat so you are never paying twice for the same context. We give every agent a budget and a hard stop so a bad afternoon stays an afternoon and not a mortgage payment. We scope ruthlessly, so the model sees what it needs and nothing more. And we instrument the whole thing so spend is visible while it’s happening, because the cheapest disaster is the one you catch in the first minute.

You own and control the system, we manage it, and “manage it” very much includes making sure it costs what it should rather than what it could. That is not a feature we add. It is part of what it means to build the thing properly in the first place.

The part worth carrying out the door

I lost a week’s budget in a day, and the most valuable thing I bought with it was a sentence I now believe completely: in AI, the bill is not the price of the intelligence, it is the price of the engineering around the intelligence. Cheap to think, expensive to think badly, and the difference between those two is entirely up to whoever built the thing.

So if you are about to budget for AI, do not ask only what it costs to build. Ask what it costs to run, and ask what stops it from costing more than that. If the answer is vague, you are looking at my afternoon waiting to happen at your scale. If the answer is specific, caching, budgets, circuit breakers, real-time visibility, you are looking at someone who has already been to the fire and built so it doesn’t start. That is the difference between a clever demo and a system you can actually afford to leave running. The model will work while you don’t. The only question is what it’s doing with the meter while you’re away.