Skip to content
anythingai.space
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 callFAILURE TAXONOMY1 hallucinated tool2 schema violation3 environment error4 logical stall5 partial batch failure6 refusal (HTTP 200!)Agentreasoning modelHarnesscatches · injectsorders API503
tool callerrorresponsesignaldatarequest
1 / 9
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