← Concept Index

Agents — core

Failure & recovery

Also called: when a tool call fails, loops and dead ends, getting stuck

DEFINITION

How an agent handles things going wrong mid-task — a tool erroring, a step failing, a dead end — by retrying, trying another path, or stopping and asking for help instead of barrelling on.

WHY IT MATTERS

Real tasks hit snags, and an agent with no recovery behaviour can loop, repeat a harmful action, or confidently produce nonsense after a failed step. Designing for failure is what separates a demo from something dependable.

COMMONLY CONFUSED WITH

The agent noticing it's stuck on its own. Without explicit handling it often won't; it can keep going as if the failed step succeeded, which is why limits and stop conditions matter.