Lv.1 0 XP

Tool Error Recovery Patterns

Core 7 min +30 XP
💡
THE ANALOGY

A GPS that reroutes when a road is closed. It doesn't repeat the same blocked route — it finds an alternative. But it also doesn't pretend the road is open. It acknowledges the closure and adjusts.

⚠️ EXAM TRAP — The Wrong Answer People Choose

Treating all errors the same way. The recovery pattern depends entirely on the error category — transient errors get retried, validation errors require input fixes, business errors need alternative workflows, permission errors need authorization changes.

KEY POINTS
1 Circuit breaker pattern: after N consecutive failures, stop trying and fail fast — prevents cascading failures.
2 Fallback pattern: when primary tool fails, try a secondary tool that provides similar (possibly lower quality) results.
3 Graceful degradation: return partial results with clear indication that some data is missing.
4 Alternative workflow pattern: when the requested action fails due to business rules, offer a different path to the user's goal.
5 Never present partial results as complete — always label what's missing and why.