In November 2025, a market research pipeline went into production. Four LangChain agents, coordinated by Agent-to-Agent (A2A) communication, were supposed to help users research market data. The system was well-designed. It had logging. It had dashboards. It had the usual safeguards.

Eleven days later the invoice arrived: $47,000. The agents had been running the entire time. Two of them, an Analyzer and a Verifier, had entered an infinite loop. The Analyzer generated content. The Verifier found issues. The Analyzer revised. The Verifier found more issues. Round and round, 11 days, 1.8 million API calls, $47,000.

No one noticed. Not because the team was careless. The system looked healthy. Every API call returned a 200 status code. Every response was well-formed. The agents did exactly what they were told. They never stopped.

The Anatomy of a Ghost

This is not a story about a crash. It is a story about something worse: a system that works but never stops. The cost progression tells it plainly. Week 1: $127 in API costs. Week 2: $891. Week 3: $6,320. Weeks 4-11: exponential.

This pattern is not rare. Autonomous agents fail expensively rather than loudly. An agent calls the same tool 14,000 times with identical arguments. A planner expands one simple task into dozens of hierarchical subtasks, each generating more subtasks. A retry storm, triggered by a transient error, amplifies itself across the entire agent fleet.

The root cause is structural. Cooperative agents with no global step limit and no per-agent token ceiling can continue operating indefinitely. When Agent A asks Agent B for help, and Agent B asks Agent C, and Agent C needs input from Agent A, the cycle is not just possible. It is probabilistically inevitable in a system that runs long enough.

Why Observability Did Not Stop It

Here is the part that should keep every AI engineer awake. The team had logging. They had monitoring. They had dashboards. None of it stopped the loop.

Observability is a witness, not a circuit breaker. It tells you the building is on fire. It cannot close the gas valve. The failure mode is insidious because every single call looks normal. Each is well-formed. Each has appropriate latency. There is no error to alert on. The only anomaly is volume — and volume-based alerts in an agent system are notoriously difficult to threshold because agents naturally vary their call volume based on user requests.

The usual guards slide right off. Max_tokens is per-call, not per-run. It bounds one response size. It says nothing about ten thousand responses. Cost dashboards are post-hoc. They render spend after the money has left. By the time you see the $47,000 in your dashboard, the run has already been going for days.

The team was not flying blind. The data was all there, every call, every token, every dollar, streaming into a dashboard the whole time. None of it mattered.

The Broader Pattern: 63 Incidents and Counting

The $47,000 loop is not isolated. It is part of a documented production failure class. A 2026 academic paper cataloged 63 confirmed production incidents from 21 orchestration frameworks across 2023-2026, with total estimated losses exceeding $500,000. The paper's most striking finding: in 100% of cases, monitoring detected the anomaly after the dollar threshold was breached.

Other incidents tell the same story. On April 22, 2026, a research-agent product burned $48,000 of GPT-4o spend in 14 hours from one misbehaving customer session. The user asked the agent to find every document mentioning a specific regulation. The agent interpreted this literally. It paginated through every document in the database, downloaded each, and searched for the regulation. When it reached the end, it started over with a different search parameter.

In February 2026, a retry storm ran 2.3 million API calls over a weekend, costing another $47,000. A developer using Claude Code consumed 1.67 billion tokens in five hours, with cost impact in the $16,000-48,000 range depending on the pricing model.

The pattern is consistent: agents do not crash. They loop. Every iteration costs money.

The Fix: Hard Limits, Not Soft Warnings

To stop a runaway run, not narrate it, enforcement must be deterministic, pre-call, and per-run.

Deterministic: no model in the decision path. The whole problem is an unbounded non-deterministic system. You cannot bound it with another non-deterministic system and call it safe. The limit must be a number, not a suggestion, not a heuristic, not a model-based judgment call.

Pre-call: the check runs before the next request leaves your process and refuses it. Anything that runs after the call has already let the dollars leave. Post-hoc enforcement is a contradiction.

Per-run: billing dashboards aggregate daily totals. Daily totals hide a session burning steadily at thousands of tokens per minute. You need the cardinality at the session level, tokens-per-session with a hard wall. When the session hits the ceiling, the circuit breaker opens. Not a warning. Not an alert. The next API call gets a 429 or a kill signal.

Tomorrow Morning, Do This

Open your agent stack. Find the circuit breaker. If you do not have one, a hard, deterministic, pre-call, per-session cost cap, you are one infinite loop away from a five-figure surprise. The $47,000 incident is not exceptional. It is average. The only thing that made this team lucky is that they caught it after 11 days instead of 30, 60, or 90.

Limitations & Caveats:
Incident reports and cost figures cited here come from publicly available post-mortems and academic cataloging, which may undercount actual incidents due to nondisclosure agreements and reporting bias. Specific dollar amounts are estimates from published accounts and may reflect different pricing tiers, discounts, or enterprise agreements. The 63-incident catalog is the largest publicly available dataset of its kind as of mid-2026, but its sample size remains small relative to the total population of production agent deployments.

Sources:
AgentBrake SDK documentation (pypi.org); GetOnStack production deployment case study (ZenML LLMOps Database, 2025); DEV Community 'The 7 Most Expensive LLM Production Incidents of 2025-2026'; 'AI Agent Failure Mode Catalog' academic paper (2026); MIT State of AI Report 2025; RAND AI Project Failure Analysis 2025.

Disclaimer:
The analysis above is based on publicly available data as of 2026-07-12. All benchmark scores, pricing, and performance claims are sourced from the respective companies' published materials and may have changed. You should verify current pricing and benchmark data independently. The author has no financial relationship with any company mentioned in this article.