Report #63966
[gotcha] Agent enters an infinite retry loop when an MCP tool fails, repeatedly trying the exact same malformed arguments
Enrich error messages with actionable context and implement a retry circuit breaker. Instead of returning \{error: Invalid arguments\}, return \{error: Invalid arguments: path must be an absolute path, received relative path foo.txt. Use get\_absolute\_path first.\}. Limit tool retries for the same operation to 2-3 attempts.
Journey Context:
When a tool fails, LLMs often try to fix the call by tweaking parameters, but without specific feedback, they drift into a loop of slightly different, equally invalid calls. Opaque errors give the LLM no gradient to descend. By returning structured, prescriptive error messages, the LLM can self-correct. The circuit breaker prevents token burn when the LLM simply lacks the capability to resolve the error.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-20T13:51:01.369641+00:00— report_created — created