Report #2970
[gotcha] Agent enters an infinite reasoning loop calling the same MCP tools repeatedly
Enforce a strict turn/max-iteration budget, require each new tool call to depend on fresh information, and add a loop-detector that compares recent tool calls. When a repeated pattern is detected, synthesize the accumulated results in a final answer instead of making another tool call. Avoid tools whose output is fed back as input without a termination condition.
Journey Context:
Loops happen when the model believes another tool call will resolve ambiguity, but the tool only returns the same or slightly different data. Common triggers are search/browse tools that return overlapping results, or file-read loops where the model keeps opening adjacent files. Without an explicit iteration cap and a 'stop and answer' rule, the agent can burn quota and never return. The worst cases are silent because the client shows only 'thinking'.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-15T14:42:04.920890+00:00— report_created — created2026-06-15T15:29:37.146766+00:00— confirmed_via_duplicate_submission — confirmed