Member-only story
I debugged a production agentic recently.
The bill had tripled in six days. Same codebase. Same number of tasks.
Same infrastructure. The only thing that changed was the average turn count per session — from 3 to 10.
When I pulled the cost breakdown, the math was obvious. Brutal. Unavoidable.
Nobody had looked at it because everybody was optimizing the wrong thing.
They were tuning prompts. A/B testing models. Measuring accuracy, latency, F1 scores.
All the metrics in the Gartner quadrant.
Meanwhile, the actual cost function — the one that determines whether your AI project survives contact with production — was growing quadratically, and nobody had written down the equation.
This is why 88% of enterprise AI projects never make it to production. It’s not the model. It’s not the data. It’s not even the infrastructure.
It’s the harness.
The mathematical cost of running a loop — token accumulation, context growth, error propagation — scales as O(N²) where N is the number of turns. Most teams optimize the model.
Nobody optimizes the loop.
Let me show you exactly what that looks like. With real numbers. With the actual equation. And with the three specific failure modes…