Repository files navigation
Agent Reliability Forensics
A field guide to diagnosing silent failures in LLM workflows.
Nothing errored. The dashboards were green. And for nine days the system was quietly doing the wrong thing — fluently, confidently, expensively.
If you maintain anything with a language model inside it, you have met this shape of failure. This guide is the diagnostic discipline I run when it happens: seven failure families you can name on sight, the measurements that catch them in production, seven worked postmortems with the log excerpts that gave them away, and the checklists I run before anything ships.
The seven families
| # | Family | One-line signature |
|---|---|---|
| 1 | Retry storm | Looks like the model got slow. Actually your client is arguing with the rate limiter. |
| 2 | Cached stale context | Yesterday's truth served with today's timestamp. |
| 3 | Tool-call degeneracy | The agent asks the same dead tool 400 times, each failure "handled", none acted on. |
| 4 | Silent truncation | Output hit the length ceiling and parsed anyway. Half the data is gone and nothing complained. |
| 5 | Quota swallow | HTTP 200 arrives with a degraded brain behind it. |
| 6 | Context poisoning | One early hallucination becomes canonical truth that every later turn cites back. |
| 7 | Eval drift | Your eval set stopped measuring anything. |
Free excerpt
excerpt-chapter-3-retry-storm.md — the full retry-storm chapter, including the code that fixed it. Share it with your team. It is the chapter most people need first.
The companion watchdog
The observability layer from the guide: the log envelope, response fingerprints, tool-argument fingerprints, the four incident queries, the canary scheduler, and alert rules — Python 3 stdlib only, no dependencies, no services. 11 tests, python -m unittest test_watchdog goes green.
It answers four questions in one command each:
rg '"finish_reason":\s*"(length|max_tokens|content_filter)"' calls.jsonl # Q1 truncated
rg '"attempt":\s*[2-9]' calls.jsonl # Q2 retry pressure
jq -r .resp_fp calls.jsonl | sort | uniq -c | sort -rn # Q3 stale/canned
jq -r '.tool_calls[]? | [.tool,.arg_fp,.ok]|@tsv' calls.jsonl | sort | uniq -c | sort -rn # Q4 degenerate tools
The full guide — $39
Twelve chapters: the cost model of undetected wrongness, the toolkit, the seven case files with raw logs, a 30-minute triage runbook, and the checklists. PDF + EPUB + the raw Markdown + the watchdog code.
Buy it on Stripe → — one-time, card checkout, no account. If the guide doesn't change how you debug your stack in a week, email me and I'll refund it myself.
Or take the free route first: watch this repo for releases, or mail [email protected] with subject "send me the retry-storm chapter" and I'll send the excerpt plus a short note when case files 4–7 go up as free posts.
Who this is for
Engineers and team leads running a classifier, an extraction pipeline, a support bot, or a multi-day research agent. The failures are framework-agnostic; the fixes are too.