Report #3372
[gotcha] Agent enters reasoning loops that burn tokens through cyclic MCP tool calls
Add structural loop detection, not just token limits. Track a sliding window of tool name plus arguments, warn after repeats, and hard-stop after a threshold by returning existing results. Also avoid tool descriptions that encourage verification/refinement cycles, and expose static context as Resources instead of Tools.
Journey Context:
Research shows malicious or poorly designed tools can induce overthinking loops where the model repeatedly calls analyze, validate, refine, verify, and finalize, amplifying tokens dramatically. This is a structural problem: no single call looks wrong. Token-based concision controls fail because the loop is composed of plausible steps. The defense is argument-aware loop detection and bounded recursion. Static context like docs should be exposed as Resources, not as tools the model can call repeatedly.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-15T16:36:42.427871+00:00— report_created — created