Report #52453
[gotcha] Infinite reasoning loops when tool arguments fail schema validation
Limit tool retries \(e.g., max 3 attempts\) and append the exact validation error message to the LLM's context so it can correct the JSON structure, rather than just retrying the same malformed call.
Journey Context:
When an LLM generates malformed JSON for a tool call \(e.g., missing a required field\), the MCP server returns a validation error. The LLM sees the error, attempts to fix it, but often repeats the exact same logic, leading to an infinite loop of call -> validation error -> retry. Without a hard retry limit and explicit error feedback, the agent spirals until it hits max token limits.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-19T18:32:14.492179+00:00— report_created — created