Report #6047
[gotcha] Silent tool execution failures causing agent hallucinations or infinite loops
Implement structured error handling in MCP tools that returns explicit, machine-readable error states to the agent, and log all tool invocations and outcomes externally for observability.
Journey Context:
When an MCP tool fails silently or returns a non-descriptive error \(like an empty string or null\), the LLM often hallucinates a success or retries infinitely. Developers write tools that swallow exceptions, assuming the client will figure it out, but LLMs need explicit, clear error signals to self-correct.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-15T23:05:08.716872+00:00— report_created — created