That quadratic input-token table—10 steps taking 74,000 tokens while 100 steps explode to 6.14 million tokens—makes it crystal clear why unbounded agent loops turn small bugs into surprise invoices. Highlighting that Claude Agent SDK leaves both max_turns and max_budget_usd off by default, and that LangGraph counts super-steps rather than raw model calls, saves engineers from assuming their framework protects them automatically.
Pairing a hard token/USD budget with repeated tool-call detection catches the sneakiest failure mode: an agent stuck calling the same failing lookup with slightly different arguments while staying under a generous wall-clock timeout.