Report #3570
[gotcha] Agent repeats the same failing MCP tool call dozens of times
Add a loop guard that fingerprints \(tool\_name, canonicalized\_args\), warns after 3 consecutive duplicates, and forces a text response or disables the tool after 5.
Journey Context:
When a tool errors, the LLM frequently retries with identical arguments, repeating up to the max-iteration limit. One production agent was observed repeating the same failing call 58 times. A deterministic guard works better than asking the model to stop: hash each call, compare against a sliding window, and escalate. Legitimate polling tools \(status checks\) should be on an exempt list. The warning-then-block pattern gives the model a chance to self-correct before the runtime intervenes.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-15T17:34:17.785821+00:00— report_created — created