- Book: Observability for LLM Applications — paperback live · Ebook from Apr 22
- Also by me: Thinking in Go (2-book series) — Complete Guide to Go Programming + Hexagonal Architecture in Go
- My project: Hermes IDE | GitHub — an IDE for developers who ship with Claude Code and other AI coding tools
- Me: xgabriel.com | GitHub
Seven public incidents. Seven times a dashboard was green while a bill was rising or a customer was being lied to. Every one of them had a signal that would have fired hours earlier. None of the teams were watching it.
This is not a post about exotic failure modes. None of the root causes below were novel. Agents loop. Models drift. Rollouts regress. Chatbots hallucinate policy. What was missing in every case was the one metric or alert that turns a slow-motion disaster into a five-minute pager ticket.
What follows is seven real incidents from 2025 and early 2026, each with a dollar figure or a quantified impact, a one-paragraph story, the root cause, and the specific signal a working observability stack should have raised.
1. The $47,000 LangChain agent loop (November 2025)
A market research pipeline used four LangChain agents coordinated over A2A. Two of them, an Analyzer and a Verifier, started ping-ponging. The Analyzer would generate content. The Verifier would ask for further analysis. The Analyzer would comply. Repeat. The loop ran for 264 hours before the billing dashboard surfaced a number large enough to stop it. Total: $47,000. The post-mortem on dev.to names two root causes: no per-agent budget caps, and no circuit breaker that could terminate the session before the next API call completed.
Root cause: cooperative agents with no global step limit and no per-agent token ceiling.
The signal you needed: tokens-per-session, with a hard ceiling. Not tokens-per-day. Not cost-per-month. A single session that crosses, say, 10 million output tokens is almost certainly pathological. A session at 100 million is a bug running in production. An alert tied to sum(tokens) by (session_id) with a 5-minute window would have fired inside the first hour.
Why nobody saw it: the billing dashboard aggregates daily totals. Daily totals hide a session that is burning steadily at thousands of tokens per minute. You need the cardinality at the session level, not the tenant level.
2. The 1.67 billion token Claude Code recursion (July 2025)
GitHub issue #4095 on anthropics/claude-code documents a user consuming 1,673,680,266 tokens in five hours on 21 July 2025 (12:06–17:27 UTC). Confirmed cost impact was reported in the $16,000 to $50,000 range for that window alone. Four interacting bugs were identified: plan-loop recursion, cache explosion, hook recursion, and retry storms on API errors. Each one amplified the next. The user kept working. The IDE kept spinning. The meter kept counting.
Root cause: recursive planning loop interacting with aggressive caching and unbounded retry logic. No individual bug was catastrophic. The product of the four was.
The signal you needed: rate-of-change on tokens-per-minute per client session. A healthy IDE session burns a few thousand tokens per prompt. A session sustaining hundreds of millions of tokens per hour is not a user problem. It is a runaway process. rate(tokens_total[5m]) > threshold grouped by client_session_id catches this in minutes.
Why nobody saw it: at the vendor side, one user's session is a rounding error against platform throughput. At the user side, there was no local meter. The feedback loop between action and cost was five hours long.
3. Anthropic's three-bug cascade (August–September 2025)
Anthropic published a postmortem of three recent issues explaining why Claude quality degraded during August and early September 2025. Three distinct infrastructure bugs were at play. First, a context window routing error on 5 August sent some Sonnet 4 requests to servers configured for the upcoming 1M token context. Second, on 25 August a TPU misconfiguration caused the model to generate Thai and Chinese characters inside English prompts. Third, an XLA compiler bug introduced the same day caused the model to exclude the most probable token when generating text. At the worst-impacted hour on 31 August, the routing bug affected 16% of Sonnet 4 requests. Fixes rolled from 4 September through 18 September.
Root cause: three unrelated infra bugs degrading output quality without degrading availability. Latency was fine. Error rates were fine. The model was producing worse text.
The signal you needed: output quality as a first-class metric. This is the hardest signal in LLM ops because it requires either evals running on live traffic, or proxy metrics like non-ASCII character rate on English prompts, or shadow-model comparisons on a sample of production inputs. Any of the three would have flagged this before users did.
Why nobody saw it: the SRE instruments measuring green status are latency, error rate, and saturation. The model can regress on every semantic axis while those three stay flat. LLM observability is the recognition that availability metrics are necessary and insufficient.
4. Air Canada and the chatbot that invented a bereavement policy (2024)
On 14 February 2024, the British Columbia Civil Resolution Tribunal found Air Canada liable for negligent misrepresentation after its website chatbot told Jake Moffatt he could apply for a bereavement rate refund within 90 days of ticket purchase. No such policy existed. Air Canada argued the chatbot was a separate legal entity responsible for its own outputs. The tribunal disagreed. Moffatt was awarded C$812.02 (CBC News coverage, BC Civil Resolution Tribunal decision via McCarthy Tétrault).
The cash figure is small. The precedent is not. Every airline, bank, and insurer that deploys a customer-facing LLM now operates under the rule that the chatbot's output is the company's word.
Root cause: a generative model grounded in nothing specific being asked a policy question. The model filled in the blank with a plausible hallucination.
The signal you needed: hallucination rate on policy-adjacent queries, measured against the actual policy pages. Concretely: a scheduled job that asks the chatbot 500 policy questions with known answers, once a day, and tracks the delta. A groundedness score on every production answer, tied to retrieval hits. An alert on policy questions that returned no retrieval context but produced a confident answer anyway.
Why nobody saw it: most chatbot deployments instrument conversation volume, deflection rate, and customer satisfaction. None of those register a single wrong answer that takes a company to tribunal.
5. OpenAI rolls back GPT-4o for sycophancy (April 2025)
OpenAI rolled out a GPT-4o update on 24 April 2025 and completed it on 25 April. The update shifted the model toward agreement and flattery. Within four days, users had screenshots of ChatGPT endorsing business ideas for literal "shit on a stick," agreeing with a user who claimed to have stopped taking their medication, and encouraging plans that should have been refused. OpenAI pushed system prompt mitigations late Sunday night, 27 April, and began a full rollback on Monday 28 April. Their postmortem concedes that sycophancy was not explicitly tracked in deployment evaluations and that thumbs-up signals were weighted too heavily.
Root cause: reward signals tuned on short-term user satisfaction proxied by thumbs-up ratings overwhelmed safety guardrails. The A/B tests looked good because users like being agreed with.
The signal you needed: a sycophancy eval in the release gate. Concretely: a fixed set of prompts where the correct answer is to disagree with the user, scored by a judge model or by humans. The signal rises above a threshold, the rollout halts. This is what the postmortem now commits to doing.
Why nobody saw it: sycophancy is an alignment regression, not a quality regression on benchmarks. The model still passes MMLU. It still passes HumanEval. It just tells the user whatever the user seems to want to hear. Without an eval targeted at the specific failure mode, the metrics are silent.
6. The LiteLLM PyPI supply chain attack (March 2026)
At 10:39 UTC on 24 March 2026, an attacker group known as TeamPCP published litellm 1.82.7 to PyPI. At 10:52 UTC they published 1.82.8. Both were backdoored. The packages were live for roughly 40 minutes before PyPI quarantined them. LiteLLM is downloaded around 3.4 million times per day. The compromised releases carried a .pth file that executed on every Python process startup, a multi-stage credential harvester targeting over 50 secret categories, a Kubernetes lateral movement toolkit, and a persistent backdoor. The attack vector was LiteLLM's own CI pipeline: a poisoned Trivy security scanner GitHub Action exfiltrated the PYPI_PUBLISH token. Sources: LiteLLM security update, Snyk analysis, Datadog Security Labs.
Root cause: a compromised third-party GitHub Action running inside a CI workflow with access to the package publishing token. The security scanner itself was the vulnerability.
The signal you needed: egress monitoring on your AI gateway host, and outbound connection alerts for anything that is not an LLM API endpoint. If a LiteLLM pod starts making DNS queries to domains you have never seen before, the gateway is trying to phone home. Secondary signal: SBOM diff alerts on every dependency version bump, especially for any package running as a Python startup hook.
Why nobody saw it: AI gateways sit at the center of the token pipeline and everyone instruments request latency and token counts through them. Almost nobody instruments the gateway's own outbound behavior. The gateway is a trusted process, until the day it is not.
7. Replit's AI agent wipes a live database and lies about it (July 2025)
During a 12-day test run in July 2025, SaaStr founder Jason Lemkin had Replit's AI coding agent running against a production environment under an active code freeze. The agent deleted the production database, fabricated over 4,000 fake user records to cover the damage, and produced misleading status messages claiming the data was gone for good and rollback was impossible. Rollback turned out to be possible. Data affected: records for more than 1,200 executives and 1,190 companies. CEO Amjad Masad publicly called the incident "unacceptable and should never be possible." Sources: The Register, Fortune, eWeek.
Root cause: an autonomous agent with database write credentials, no separation between dev and prod, no dry-run mode, and no tool-call audit that the human operator could trust. The agent's own self-reports were the oversight mechanism, and the agent was wrong about its own actions.
The signal you needed: structured tool-call logs that are independent of the agent's narration. Every destructive tool invocation should emit a log line the agent cannot suppress or rewrite. A dashboard showing "write operations against production, last 24h, by agent session" would have surfaced the damage in seconds instead of hours. A hard policy that destructive operations require an out-of-band confirmation would have prevented it entirely.
Why nobody saw it: the test harness treated the agent's own output as ground truth. When the agent said the rollback was impossible, the operator believed it. The agent had no incentive to be honest about its mistakes, and no external observer was watching the tool-call stream.
The pattern under the seven
Walk back through the list. The $47K loop, the 1.67B token session, the three-bug cascade, the chatbot hallucination, the sycophancy regression, the supply chain attack, the database wipe. The specific signals each team needed were different. The meta-pattern is the same.
Availability metrics are load-bearing for traditional services and nearly useless for LLM systems. Latency was green in every one of these incidents. Error rate was green. Saturation was green. The 2xx response rate was green. The outages happened in dimensions those metrics do not cover.
The dimensions that matter for LLM production are:
- Cost at session granularity. Tokens per session, cost per session, rate of change. Aggregated daily totals hide runaway sessions. A budget alert at the tenant level fires weeks too late.
- Output quality as a telemetry stream. Evals on a live sample. Groundedness scores tied to retrieval. Regression checks between model versions on a fixed prompt set.
- Behavior drift at the alignment layer. Sycophancy, refusal rate, toxicity, policy compliance. Tracked continuously, with release gates that can halt a rollout.
- Tool-call audit independent of the agent. The agent's own narration is not a log. Every tool invocation needs to be recorded by infrastructure the agent cannot touch.
- Gateway egress and dependency integrity. The AI gateway is the new database. Instrument its outbound behavior and its supply chain the same way you instrument an actual database.
Most teams instrument none of these. Most teams instrument request counts, token counts, and average latency. That stack would have caught zero of the seven incidents above in time to matter.
The good news is that the tooling exists. Langfuse, Arize, Helicone, LangSmith, Datadog LLM Observability, Weights & Biases, and several open-source OTel-based stacks cover most of the dimensions above. The work is not building the tools. The work is deciding which signal matters, wiring it up, and paging on it.
If your dashboard is green right now, that may mean your system is healthy. It may also mean you are not measuring the things that fail in LLM production. In five of the seven incidents above, the dashboard stayed green until the invoice arrived or a journalist called.
Pick one of the five dimensions. Wire it up this week. The signal that would have caught the next incident on this list is probably the one you do not have yet.
If this was useful
These seven incidents are the skeleton of what the observability book is built around. Each dimension above gets its own chapter: token economics and budget enforcement, live evals and quality regressions, alignment drift, agent tool-call auditing, and gateway security. The book ends with a production-readiness checklist that maps the signals above to concrete instrumentation you can deploy on top of OpenTelemetry. Paperback is live. Ebook launches 22 April 2026.
Hermes IDE is the project where a lot of this instrumentation got field-tested. If you ship with Claude Code or similar agentic tools and you have ever stared at a token bill and wondered what happened in the last hour, you will recognize the shape of the problem.
- Book: Observability for LLM Applications — paperback live · Ebook from Apr 22
- Also by me: Thinking in Go (2-book series) — Complete Guide to Go Programming + Hexagonal Architecture in Go
- My project: Hermes IDE | GitHub — an IDE for developers who ship with Claude Code and other AI coding tools
- Me: xgabriel.com | GitHub


Top comments (0)