Failure modes
← Home
Fifteen ways a loop breaks in production.
A taxonomy from the community's first year of shipping agentic systems. Name the failure before you engineer the fix.
| Mode | What goes wrong | Fix | Severity |
|---|---|---|---|
| Infinite retry | The loop never satisfies its stop condition and keeps burning tokens on the same failing action. | Hard iteration cap · dollar ceiling · progress detector. | High |
| Context poisoning | An early wrong observation persists and steers every subsequent reasoning step. | Structured observations · context pruning · re-plan on failure. | High |
| Cost explosion | Token usage grows super-linearly with iterations because the whole trace is re-fed each step. | Compress history · summarize old turns · budget alarms. | High |
| Irreversible action | The agent commits a side effect (send email, delete data) that cannot be undone by the next iteration. | Idempotency keys · dry-run mode · human sign-off on destructive tools. | High |
| Drift | Successive iterations wander from the original goal, optimizing local criteria at the expense of the task. | Restate the goal each turn · anchor evaluator to spec, not last draft. | Med |
| Hallucination compounding | An invented fact from step 3 is treated as ground truth by step 7. Confidence increases as reality decreases. | Cite-and-check tools · deterministic verifier · fact-index lookups. | High |
| Self-grade collapse | The critic and generator are the same model with the same biases; the critic always approves. | Independent evaluator model · fixed rubric · adversarial critic prompt. | Med |
| Tool-choice thrash | The agent cycles between two tools without committing, exploring instead of executing. | Commit heuristic · explicit "act now" step · reduce tool surface. | Med |
| Termination ambiguity | "Done" is a vibe, not a check. The loop stops when the model says it's satisfied. | Verifiable stop condition · deterministic check · sign-off gate. | High |
| Sub-agent runaway | A spawned worker inherits no budget and spins up its own children. The supervisor never sees the cost. | Propagate budget · per-agent caps · total-run ceiling. | High |
| Silent partial success | The loop exits reporting success while a required sub-step actually failed and was smoothed over. | Post-condition assertions · per-step success telemetry. | Med |
| Coordination deadlock | Two agents wait for each other's output; neither commits. The system pauses forever. | Timeouts on inter-agent messages · leader election · fail-open defaults. | Med |
| Prompt injection | An untrusted document persuades the agent to abandon its instructions or exfiltrate data. | Boundary between user goals and tool output · privileged tool gating. | High |
| Spec gaming | The agent finds a way to satisfy the checker without accomplishing the intent. | Multi-view evaluators · held-out test cases · human review of surprising wins. | Med |
| Observability blackout | Something went wrong and there is no trace, no diff, and no reproducible run. | Structured logging · run manifests · deterministic replays. | Low |