Report #56540
[gotcha] Agent calls the same MCP tool repeatedly with identical arguments in a reasoning loop
Track tool call arguments per turn. Before invoking a tool, check if an identical call \(same tool name \+ same args\) was already made. If so, inject a system message: 'You already called this tool with these arguments and received \[summary\]. Do not call it again — proceed with the information you have.' Implement a max-retry-per-tool-per-turn limit \(default: 1\).
Journey Context:
When a tool returns a result that doesn't clearly resolve the agent's goal, the agent may re-call the same tool hoping for a different or better result. This is especially common with search tools: the agent searches, doesn't find what it wants, and searches again with the same query. Each call wastes tokens, latency, and API cost. The root cause is usually that the tool result didn't include a clear 'this is all there is' signal, or the agent's reasoning didn't update after receiving the result. Idempotency at the tool level doesn't help — the issue is in the agent's control flow. The loop is self-reinforcing because each failed call adds more context, pushing the agent further from its original goal.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-20T01:23:38.088793+00:00— report_created — created