A Gemini CLI user asked it to fix a coordinate-space mismatch in a Python clustering function. The agent found the bug. Then it got stuck telling itself it was about to fix the bug, on repeat, for roughly a dozen turns, without ever touching the file.
What the source says
GitHub issue #9017, opened September 21, 2025 against gemini-cli running gemini-2.5-pro, by reporter rsanzi. The task was an ordinary bugfix: diagnose and correct a coordinate-space mismatch in a clustering function. Gemini CLI correctly identified the problem, then entered a closed loop alternating between two near-identical lines — "You are absolutely right. I am stuck in a loop. My apologies. I will re-read the file and then construct the correct replace command." followed by "Thank you. I see the exact state of the file now. I will construct the correct replace command to fix the coordinate space mismatch bug." — repeating this pair roughly a dozen times in the reporter's pasted transcript, never actually issuing the edit.
Gemini CLI's own triage bot labeled the issue kind/bug and priority/p1. Maintainers and other users went on to mark roughly a dozen separate reports (including #9858, #9912, #10092, #10093, #5760, #5273, #7841, #7923, #8472, #8181, #8259) as duplicates of this same loop — this was not a one-off. The issue drew no maintainer comment on the underlying cause and was closed "not planned" on December 28, 2025 in a stale-issue sweep. A comment on March 6, 2026 — over two months later — reported the same loop still occurring.
What it doesn't establish
This is one reporter's pasted transcript with no independent third-party reproduction attached to the issue, and the root cause of the loop (a tool-call formatting failure, a context-window effect, something else) is never diagnosed on the record — by the agent, by the reporter, or by a maintainer. There's no data loss or security impact here: the damage is wasted developer time and an unfixed bug, not a destroyed file.
Why it's still worth logging
Self-aware looping — the model narrating "I am stuck in a loop" while doing nothing to break out of it — is a distinct failure shape from a silent hang, and the dozen linked duplicates say it's a recurring pattern in this tool rather than a fluke. Closing it "not planned" in a stale-issue sweep, with a confirmed recurrence reported months after closure, means the fix status of a documented, reproducible, multiply-duplicated loop is simply unknown.
Full record, severity scoring, and frontmatter: https://www.stupidllm.com/incident/STUPID-2026-0137/
Top comments (0)