Agentic Systemsintermediate13 min · 9 steps
Error Handling and Recovery
Agents fail in non-deterministic ways. Turn errors into observations, break loops, roll back to safe state, kill runaway runs out-of-band, and degrade gracefully.
tool callerrorresponsesignaldatarequest
ProblemStep 1 of 9
Six ways an agent step goes wrong
Hallucinated tool (calls one that doesn't exist) · schema violation (wrong arguments) · environment error (the API is down) · logical stall (the same failing action, again — the ReAct loop of death) · partial batch failure (one of several calls in a turn fails midway) · provider refusal (a safety classifier stops the call).
That last one is quiet: on Claude Fable 5.1 a refusal returns HTTP 200 with stop_reason: "refusal", not an exception — and since September 2026 some pre-output refusal categories are billed, so a refusal loop costs money.
Watch outA try/catch that stops the run fails the user's task. In an agent, the model is the driver — it needs to hear about the crash.
Lesson 7 of 15 in Agentic Systems