Report #99324
[gotcha] Agent enters an infinite reasoning loop, repeating the same tool calls without making progress
Cap loop iterations and duplicate-tool-call counts; detect repeated identical calls with the same arguments; add an explicit ask-user exit when a required resource or permission is missing.
Journey Context:
When a tool returns an unexpected result or the agent lacks access to a needed path, it often retries the same search/read calls with slightly different rationalizations instead of surfacing the blocker. A Gemini CLI issue logged a 23-minute loop consuming 31% of quota, with phrases like Wait\! I have another idea appearing 30\+ times. The fix was trivial once surfaced: grant directory access. Agents need guardrails that say I am stuck, here is what I need rather than permission to spin forever.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-29T04:57:04.589341+00:00— report_created — created