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

A potential loop was detected. This can happen due to repetitive tool calls or other model behavior. The request has been halted.

Open Ashik1103 opened this issue 1 year ago • 3 comments

What happened?

When using the Gemini CLI, I encountered an error that halted execution with a message:

“A potential loop was detected. This can happen due to repetitive tool calls or other model behavior.”

This occurred without any intentional recursive calls on my part. The CLI seemed to be stuck and terminated unexpectedly.

What did you expect to happen?

I expected the command to execute normally without triggering a loop detection error. There was no intentional recursion, so the process should have completed or at least thrown a clearer error.

Client information

  • CLI Version: 0.1.15
  • Git Commit: c45c14ee (local modifications)
  • Operating System: win32 v22.17.0
  • Sandbox Environment: no sandbox
  • Model Version: gemini-2.5-pro
  • Memory Usage: 141.3 MB

Login information

No response

Anything else we need to know?

No response

Ashik1103 avatar Jul 31 '25 12:07 Ashik1103

I'm facing the same problem with both pnpx from github release and pnpm install. I'm using the Google Oauth auth method and I've not retried with Vertex AI API key yet.

I have the feeling it might be a more general outage than just gemini-cli.

vorpax avatar Jul 31 '25 12:07 vorpax

Me too.

caokai674 avatar Aug 09 '25 02:08 caokai674

Me too

nevertoday avatar Feb 02 '26 14:02 nevertoday