gemini-cli - 💡(How to fix) Fix gemini-3.1-pro-preview stuck thinking while trying to call a tool [2 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
google-gemini/gemini-cli#26373Fetched 2026-05-03 04:52:29
View on GitHub
Comments
2
Participants
2
Timeline
6
Reactions
0
Author
Participants
Timeline (top)
commented ×2renamed ×2cross-referenced ×1labeled ×1

Code Example

> /about                                                                                                                                                                           

╭──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│                                                                                                                                                                                  │
About Gemini CLI│                                                                                                                                                                                  │
CLI Version                                                   0.40.1Git Commit                                                    7a382e066                                                                                                          │
Model                                                         gemini-3.1-pro-preview                                                                                             │
Sandbox                                                       no sandbox                                                                                                         │
OS                                                            linux                                                                                                              │
GCP Project                                                   geminicli-487712│                                                                                                                                                                                  │
╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
RAW_BUFFERClick to expand / collapse

What happened?

gemini-3.1-pro-preview can get stuck while thinking, trying to call a tool, but not doing it for a very long time, ending up saying the same stuff over and over. <img width="1426" height="458" alt="Image" src="https://github.com/user-attachments/assets/e78fa22e-196f-4bea-9dd9-7e3177cc6939" />

What did you expect to happen?

It should call the right tool immediately

Client information

<details> <summary>Client Information</summary>

Run gemini to enter the interactive CLI, then run the /about command.

> /about                                                                                                                                                                           

╭──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│                                                                                                                                                                                  │
│ About Gemini CLI                                                                                                                                                                 │
│                                                                                                                                                                                  │
│ CLI Version                                                   0.40.1                                                                                                             │
│ Git Commit                                                    7a382e066                                                                                                          │
│ Model                                                         gemini-3.1-pro-preview                                                                                             │
│ Sandbox                                                       no sandbox                                                                                                         │
│ OS                                                            linux                                                                                                              │
│ GCP Project                                                   geminicli-487712                                                                                                   │
│                                                                                                                                                                                  │
╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
</details>

Login information

Google Account

Anything else we need to know?

No response

extent analysis

TL;DR

The issue might be resolved by investigating the tool invocation process in the gemini-3.1-pro-preview model to ensure it's correctly configured and not causing the stuck state.

Guidance

  • Verify the tool invocation configuration in the gemini-3.1-pro-preview model to ensure it's set up correctly.
  • Check for any known issues or updates related to the gemini-3.1-pro-preview model that might be causing the problem.
  • Run the /about command in the Gemini CLI to gather more information about the environment and configuration.
  • Investigate the possibility of a timeout or retry mechanism in the tool invocation process that might be causing the repetitive behavior.

Example

No code snippet is provided as the issue does not contain sufficient technical details to create a relevant example.

Notes

The provided information is limited, and the root cause of the issue is unclear. Further investigation into the gemini-3.1-pro-preview model and its configuration is necessary to determine the exact cause and solution.

Recommendation

Apply workaround: Investigate and adjust the tool invocation configuration and process to prevent the stuck state, as the issue seems to be related to the specific model and its interaction with tools.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

gemini-cli - 💡(How to fix) Fix gemini-3.1-pro-preview stuck thinking while trying to call a tool [2 comments, 2 participants]