Report #100257
[gotcha] Agent gets stuck in a reasoning loop, calling the same MCP tool repeatedly with the same or nearly-same arguments
Track the set of \(tool, arguments\) already invoked in the current task; cap total turns; detect identical consecutive calls and short-circuit them with the previous result; and give the model an explicit 'I need human help' or 'task complete' tool.
Journey Context:
LLM agents don't have native halting guarantees. If a tool returns ambiguous output, the model may call it again with slightly different wording, or ask a follow-up question and then re-ask forever. This is the agentic version of an infinite loop. A visited-set of tool invocations catches exact duplicates, but you also need a turn budget because the model can oscillate between two related tools. The cleanest design is to make the task boundary explicit: the agent must decide after each observation whether it has enough information, needs a different tool, or should stop.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-07-01T04:55:11.954931+00:00— report_created — created