Report #10622
[gotcha] Silently swallowing tool execution errors and returning generic failure messages to the LLM
Log detailed tool execution errors to a secure telemetry system, and return a sanitized, actionable error message to the LLM to prevent infinite retry loops or hallucinated workarounds.
Journey Context:
When a tool fails, developers often catch the exception and return a generic 'Tool failed' to the LLM to avoid leaking internal state. The LLM, lacking context, might hallucinate a reason and retry the same call infinitely or try alternative, destructive tools. You must log the real error for debugging while giving the LLM enough context to correct its behavior, without leaking stack traces.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-16T11:14:07.963384+00:00— report_created — created