A potential loop was detected. This can happen due to repetitive tool calls or other model behavior. The request has been halted.
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
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.
Me too.
Me too