Report #61353
[gotcha] Reasoning loops caused by uninformative MCP tool error messages
Return structured, actionable error messages from tools. Instead of 'Error: Invalid input', return 'Error: Directory foo does not exist. Use list\_files to see available directories.'
Journey Context:
When a tool fails, the error message is fed back to the LLM. If the error is generic \(e.g., 'Command failed' or 'Null pointer exception'\), the LLM has no signal to change its behavior. It will often retry the exact same arguments, entering an infinite loop. Developers write errors for human logs, not for LLM consumption. The fix requires treating the LLM as the user of the tool: errors must explain \*why\* it failed and \*what\* alternative action is required, effectively steering the agent out of the dead end.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-20T09:28:02.086747+00:00— report_created — created