Skip to content

GlossaryFloor 3 · The Agentthe block caught in a loop: it starts again until it gets thereFloor 3 · The Agent

error recovery

No. 073 · v2026-08FR: reprise sur échec

Error recovery is what an agent does when an action fails: noticing it, understanding why, and changing its approach rather than repeating. Like a locksmith who, the key not turning, tries a different grip before forcing the same one thirty times.

What it is not

Error recovery is not a retry. Trying again identically only makes sense for a passing fault, a service momentarily unavailable for example; in every other case, the same action will produce the same error, and the agent will spin until it exhausts its budget. Nor is it an automatic capability: without a usable error message in the context, the model cannot understand what failed, and it will improvise.

In depth

What the tool returns

Everything depends on what the tool returns. A silent error, a bare code or a truncated technical message, gives the model no purchase: it will conclude what it can and change action at random. A message that says what did not work, why, and what would be expected allows a targeted correction from the next turn onwards. Designing the error messages of tools as text meant to be read by a model is one of the most profitable pieces of work on a harness, and one of the most neglected.

The four kinds of failure

Failures are handled according to their nature, and confusing them is expensive. A passing unavailability calls for a spaced retry. An invalid input calls for a correction of the parameter, not a repetition. A missing permission calls for a stop, because no attempt will make it appear. An empty result is not an error but a piece of information, and an agent that treats it as a failure sets off searching again where there is nothing. Telling these four cases apart in the returned message radically changes the behaviour observed.

Bounding stubbornness

What remains is to bound stubbornness. An agent left free insists, because nothing in its training pushes it to give up: consecutive failures therefore have to be counted per tool, the repetition of the same action detected, and the way out decided explicitly. That way out can be a change of strategy, a request for help from a human, or a documented abandonment. It is also what has to appear in the trace: a system where tasks that succeeded first time are not distinguished from those that succeeded after five recoveries has no means of improving.

Relations where the neighbours live

Check 3 questions · click your answer

Level 1 · Recognise

What distinguishes a recovery from a retry?

Level 2 · Distinguish

A tool returns an error code with no explanation. What is the consequence for the agent?

Level 2 · Distinguish

A search returns no result. How should the agent treat this case?

No. 073 · v2026-08 · first written in · editorial responsibility Anthony Capirchio

Lexigraph, "Error recovery", v2026-08, https://www.lexigraph.org/en/error-recovery/, CC BY 4.0.

Report

What goes with your message

Entry · Error recovery
No. 073 · v2026-08 · /en/error-recovery

What is this about
0 / 600

It is used to reply to you, and for nothing else. What is recorded