LLM Agents & Tool Use

agent error recovery

Real runs go wrong constantly: a tool returns an error, a website is down, a search finds nothing, a plan hits a dead end. Error recovery is how an agent notices these failures and responds — by retrying, trying a different tool, or stepping back to revise the plan — instead of charging ahead as if nothing happened. It is the difference between an agent that stumbles once and gives up, and one that works around obstacles.

Recovery has two parts: detection and response. Detection means recognising that something failed — an explicit error message is easy, but a tool that silently returns useless output is harder and often needs a sanity check. Response ranges from a simple retry for a transient glitch, to switching tools, to replanning the remaining steps when the original approach is clearly broken. Matching the response to the kind of failure is the skill.

The hard failure mode is silent error: when an agent does not realise it failed, it can confidently build later steps on a broken result, or loop forever retrying the same doomed action. Good recovery therefore depends on good signals and sensible limits — a cap on retries so a stuck agent stops rather than spins.

Also called
failure recoveryretry and replan