Report #4623
[gotcha] Agent calls the same tool with identical arguments repeatedly in a loop getting the same result
Before re-invoking a tool check whether the same call with the same arguments was already made in the current conversation. If a tool call returned an error always modify the arguments or try a different approach on retry and never re-invoke with identical arguments. Implement a maximum retry count per unique tool plus arguments combination, for example 2.
Journey Context:
When a tool returns an unexpected or error result the model often reasons that maybe if it tries again it will work and re-invokes with identical arguments. This is the Monte Carlo fallacy applied to tool use. The loop can continue for many iterations because each failed attempt adds context that makes the model more confused rather than less. It sees repeated failures but interprets them as the tool malfunctioning rather than its arguments being wrong. Each iteration consumes tokens and context, progressively degrading the model ability to break out of the loop. Breaking this requires explicit loop detection or instructions to always modify arguments on retry.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-15T19:48:39.748623+00:00— report_created — created