GLOSSARY / RUN FAILURE

Run failure vocabulary

Six named runtime failure modes of agents — what each one is, how it is detected, and where the judgment lives. The names enter the engine's type system (RunFailureKind), which gives detection, adjudication, recovery, audit and testing a place to hang. Detection is layered on purpose: spin / blowup / thrash are computed at checkpoints by the guard rule table; stall is watched by an independent-thread watchdog; burn hangs on the budget channel; drift is prevented by the task system and caught by LLM review. Each layer only watches what it can actually observe.

01 / SPIN

spin

spinning in place

Doing the same thing over and over — same tool, same arguments, same result — while treating it as progress.

Detection: ≥5 consecutive calls with the same tool + same arguments + same result.

Where: guard rule table, computed at checkpoints (default-run-guard.ts).

02 / BLOWUP

blowup

hitting the same wall

Crashing into the same error again and again — neither changing course nor asking for help.

Detection: the same error ≥3 consecutive times (identical error content).

Where: guard rule table, computed at checkpoints (default-run-guard.ts).

03 / THRASH

thrash

thrashing

Plenty of motion, a high failure rate, zero progress.

Detection: failure rate > 50% and no progress in the last three rounds and enough samples — all three conditions together.

Where: guard rule table, computed at checkpoints (default-run-guard.ts).

04 / DRIFT

drift

drifting off

What is being done quietly separates from what was asked — every local action is legal, the overall direction is already off.

Detection: LLM review only (pure rules cannot see semantic drift); the task system prevents it in the first place.

Where: task system (prevention), LLM review layer (catch).

05 / STALL

stall

frozen

The run is still "running" but the heartbeat is gone — a frozen event loop cannot detect its own freeze.

Detection: heartbeat silent ≥30s.

Where: independent-thread watchdog (loop-watchdog.ts) — detection must live outside the loop it watches.

06 / BURN

burn

burning through

Budget or round limit exhausted, still not converging.

Detection: hard round / time caps.

Where: the budget channel. Accounting only records, never kills (Budget ⊥ Guard); the kill goes through the recovery ladder observe → warn → compact → wrap-up → stop.

NOTES / SOURCES & REPRODUCIBILITY

  • Threshold sources: default-run-guard.ts (guard rule table), loop-watchdog.ts (stall watchdog), the budget channel (burn). Thresholds evolve with the implementation — the repository is the source of truth.
  • Reproducible: ChaosProvider (src/testing/chaos-provider.ts) injects timeout / rate_limit / empty_response / malformed / truncated / partial_tool_call — this is not something we describe; you can run it yourself.
  • The thresholds were fixed the hard way: early consecutiveErrors >= 3 mislabeled "red-fix-green" as a stall, and early toolFailureRate > 0.5 mislabeled "write the failing test first" as thrash — both correction stories are in the article.
  • Read the full story: 6 Agent Failure Modes We Keep Hitting in Production.