Retry Inflation
The exponential expansion of API costs and latency that occurs when autonomous AI agents enter unbounded retry loops while attempting to correct their own errors. Because each subsequent attempt often requires passing the entire failure context back to the LLM, token spend compounds rapidly. Retry inflation turns a minor localized error into a cascading financial and computational drain, often resulting in massive, unexpected cloud bills.
“An agent that refuses to give up is an agent that will bankrupt you.”
In traditional software, a failing loop might burn CPU cycles, which are relatively cheap. In LLM-based architectures, a failing loop burns API tokens, which directly hit the gross margin. If an agent tries to fix a script, fails, reads the error, and tries again five times, the context window grows larger with each attempt, making the fifth attempt significantly more expensive than the first. Without strict circuit breakers, retry inflation can destroy the unit economics of an AI application in minutes.
Richard Ewing’s Research Thesis
All AI agent systems must implement financial circuit breakers on retry logic.
Why This Specification Exists
AI applications incur massive unexpected cloud bills when agents get stuck in failure loops.
Treating AI agent retries like standard HTTP retries.
No framework for understanding how context window expansion turns linear loops into exponential costs.
Identifying Retry Inflation as a unique, critical architectural anti-pattern.
What Changes If You Believe This?
Architects implement strict token-budget limits per agent session, halting execution when budgets are exceeded.
Sets hard caps on LLM API keys to prevent unbounded spend.
Designs UX that gracefully hands off to a human when an agent fails.
Monitors agent loops for malicious intent or denial-of-wallet attacks.
Recommended Action by Role
Set up real-time billing alerts for anomalous token consumption spikes indicative of retry inflation.
Latest Publications & Research Activity
How to Reduce LLM API Token Costs in Production
How to Reduce LLM Costs in Production: The Inference Dividend Model
Growth Is Not Your Cost Problem - Your Architecture Is
Frequently Asked Questions
Q:How do you prevent Retry Inflation?
Implement strict, hard-coded limits on the number of automated retries, and truncate the context window to remove older, failed attempts.
Q:Why does the context window grow during a retry?
Agents typically need to see their previous attempt and the resulting error message to know what to fix, stacking new text on top of the old.
Inspectable Evidence Ledger
Classified evidence items supporting, extending, or refining this canonical research specification.
Recommended Citation
Ewing, R. (2026). "Retry Inflation." Richard Ewing Research Canon. Available at: https://www.richardewing.io/concepts/retry-inflation
@article{ewing_retry_inflation,
author = {Ewing, Richard},
title = {Retry Inflation},
journal = {Richard Ewing Research Canon},
year = {2026},
url = {https://www.richardewing.io/concepts/retry-inflation}
}