Errors & recovery · 2026-08-04

A tool call fails with an error.

What should your loop do?

  1. ARetry the same call a few more times with the same arguments, since most tool errors are temporary
  2. BFeed a clear error message back so the model can adapt
  3. CSilently ignore it and continue
  4. DRetry the exact call forever

Answer: B

Feed a clear error message back so the model can adapt

Why

Turn errors into information: a clear error message back in the loop lets the model correct course. Crashing, ignoring, or blind retries all fail.

More on this topic

More on Way of the Agent

Real situations from building agents - with the answer and why.

Solve a new one every day on the Path