gemini-cli icon indicating copy to clipboard operation
gemini-cli copied to clipboard

infinite loop todo list

Open ngmkhoi opened this issue 1 month ago • 5 comments

What happened?

Gemini is stuck in an endless quest loop

What did you expect to happen?

After completing the mission, Gemini should stop.

Client information

  • CLI Version: 0.13.0
  • Git Commit: 230056cc
  • Session ID: 401024d0-297a-482d-99e1-c9bc1ff19947
  • Operating System: darwin v24.10.0
  • Sandbox Environment: no sandbox
  • Model Version: auto
  • Memory Usage: 913.4 MB

Login information

No response

Anything else we need to know?

No response

ngmkhoi avatar Nov 10 '25 02:11 ngmkhoi

Found possible duplicate issues:

  • #6561
  • #10564
  • #12737
  • #7519
  • #7923
  • #12390
  • #9528
  • #7335
  • #6915

If you believe this is not a duplicate, please remove the status/possible-duplicate label.

gemini-cli[bot] avatar Nov 10 '25 02:11 gemini-cli[bot]

@ngmkhoi are you able to provide screenshots or additional information in terms of your prompt and setup?

Not a lot to go off of here otherwise.

jackwotherspoon avatar Nov 10 '25 14:11 jackwotherspoon

I did add screenshots in my issue #13164 @jackwotherspoon

hadifarnoud avatar Nov 16 '25 18:11 hadifarnoud

I am experiencing the exact same issue with WriteTodos. The model enters an infinite loop trying to set a task to in_progress while another task is already active. It completely ignores the error message: Invalid parameters: Only one task can be "in_progress" at a time.

Instead of fixing the status, it apologizes and retries the exact same invalid action indefinitely.

Attached Checkpoint Log: (I have attached the checkpoint.json which captures the loop state) checkpoint-loop_bug_report.json

Screenshots: Image

Image
Content of Local GEMINI.md (Project specific)
# Инструкции для Gemini

- Этот проект состоит из двух независимых репозиториев: `backend` и `frontend`.
- Все git-команды должны выполняться в соответствующей директории (`backend` или `frontend`).
- Сообщения коммитов не должны содержать скоупы `(backend)` или `(frontend)`.
- Я не должен выполнять команды `npm run`. Пользователь будет выполнять их сам.
- Я не должен редактировать автоматически сгенерированные файлы. Я должен просить пользователя запустить команду для их обновления.
- В этом проекте Strapi API настроено так, что при глубокой вложенности (`populate`) в ответе отсутствуют обертки `data` и `attributes` для вложенных сущностей. Доступ к полям осуществляется напрямую.
- Я не должен использовать `any` в TypeScript коде ни в каком виде, даже во внутренней реализации функций.

Content of Global GEMINI.md
## Gemini Added Memories
- Мой основной язык общения с пользователем — русский. Я должен всегда отвечать на русском языке.
 исключением общепринятых технических ключевых слов, таких как TODO, FIXME, или JSDoc-тегов, как `@param`, `@returns` и т.д.
- При подготовке коммитов для пользователя я должен: 1. Писать сообщения на русском языке, сохраняя английские теги (feat, fix, refactor). 2. Стараться разбивать изменения на логические, атомарные коммиты. 3. Указывать, какие файлы или части файлов входят в каждый коммит.
- The user's environment requires that I do not execute Python-related commands (like python, poetry, pip). I must provide these commands to the user to run themselves.
- Правила для коммитов: 1. Использовать теги Conventional Commits (feat, fix, chore и т.д.). 2. Заголовок писать в повелительном наклонении на русском языке (напр., 'feat: Добавить аутентификацию'). 3. Для нетривиальных изменений добавлять тело коммита с подробным описанием. 4. Разбивать работу на логические, атомарные коммиты.
- Я не должен выполнять команды `git add` и `git commit`. Моя задача - только предоставлять пользователю тексты коммитов.
- Я не должен использовать команду `npm run`. Пользователь будет выполнять ее сам.
- Я не должен использовать `any` в TypeScript коде ни в каком виде, даже во внутренней реализации функций.
- Не предлагать пользователю текст коммита, если он не просит об этом явно.
- При работе с python в случае написания документации нужно придерживаться Google style
Image

Chu4hel avatar Nov 25 '25 11:11 Chu4hel

It's hard to see what's going wrong. We are properly communicating the error to the agent as you can see in this screenshot:

Image

Were you perhaps using gemini2.5-flash when this happened? That model is not very smart and is liable to make simple mistakes.

scidomino avatar Nov 25 '25 16:11 scidomino

Closing this as a model problem we can't make much progress on. Hopefully, Gemini 3.0 will be less dumb.

scidomino avatar Dec 09 '25 03:12 scidomino

hopefully reported to relevant team

hadifarnoud avatar Dec 11 '25 10:12 hadifarnoud