RTX 3050 - Order Now
Home / Blog / Tutorials / Tool Use Error Recovery
Tutorials

Tool Use Error Recovery

When tool calls fail mid-agent-loop — recovery patterns, retry semantics, fallback strategies.

Table of Contents

  1. Error classes
  2. Recovery
  3. Verdict

Tool use in agentic AI fails in specific ways: tool unavailable, arguments invalid, returned data unexpected, downstream service rate-limited. Recovery patterns determine whether the agent gracefully continues or fails the user. Build robust error handling into the tool layer.

TL;DR

Error classes: tool down, invalid args, malformed result, rate-limited. Recovery: retry with backoff for transient; reformulate args for invalid; fall back to alternative for down; surface to user when agent can't recover. Always include the error in the conversation context so the LLM can adapt subsequent actions.

Error classes

  • Tool unavailable / 5xx: external service down. Retry with backoff; fall back to alternative if persistent.
  • Invalid arguments / 4xx: LLM produced bad arguments. Surface error to LLM; let it reformulate.
  • Rate-limited / 429: backoff and retry. If persistent, suggest alternative tool.
  • Malformed result: tool returned data that doesn't match expected schema. Surface to LLM with raw output.
  • Authorisation denied: user lacks permission. Surface to user; agent can't recover.

Recovery

  • For transient: standard exponential backoff retry
  • For permanent within one call: include error in conversation; LLM reformulates next step
  • For dependency failure: alternative tool (e.g., different API; cached data; degraded mode)
  • For rate limits: respect Retry-After; switch to alternative if available
  • For unrecoverable: graceful degradation message to user; log for analysis

Verdict

Tool use error recovery is essential for production agents. Each error class needs its own pattern; LLMs adapt remarkably well when errors are surfaced in conversation context. The mistake is silent retry / silent failure; agents become incoherent. Always log; always provide recovery signal to the LLM.

Bottom line

Surface errors to LLM; standard retry semantics. See error handling.

Need a Dedicated GPU Server?

Deploy from RTX 3050 to RTX 5090. Full root access, NVMe storage, 1Gbps — UK datacenter.

Browse GPU Servers

gigagpu

We benchmark, deploy, and optimise GPU infrastructure for AI workloads. All data in our guides comes from real-world testing on our UK-based dedicated GPU servers.

Ready to deploy your AI workload?

Dedicated GPU servers from our UK datacenter. NVMe storage, 1Gbps networking, full root access.

Browse GPU Servers Contact Sales

Have a question? Need help?