gemini-cli - 💡(How to fix) Fix Stuck at thinking [3 comments, 4 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#26126Fetched 2026-04-29 06:35:37
View on GitHub
Comments
3
Participants
4
Timeline
4
Reactions
1
Timeline (top)
commented ×3labeled ×1

Error Message

Gemini CLI sometimes gets stuck on the “Thinking” state and does not return any response. This issue happens intermittently, so it does not occur every time, but when it does happen, the CLI continues processing for a long time without showing any output, error message, or timeout notification. The expected behavior is that Gemini CLI should either return a response within a reasonable amount of time or display a clear error message if the request fails or takes too long. However, the actual behavior is that it remains stuck on "Thinking," forcing the user to manually cancel the request, restart the CLI, or try again. This affects normal usage because it interrupts the workflow and makes the tool unreliable. Please investigate whether this issue is related to request timeout handling, network/API delays, or missing error feedback from the CLI. I expected Gemini CLI to process the prompt and return a response within a reasonable time. If the request failed or took too long, I expected it to show a clear error message or timeout notificati

Root Cause

Gemini CLI sometimes gets stuck on the “Thinking” state and does not return any response. This issue happens intermittently, so it does not occur every time, but when it does happen, the CLI continues processing for a long time without showing any output, error message, or timeout notification. The expected behavior is that Gemini CLI should either return a response within a reasonable amount of time or display a clear error message if the request fails or takes too long. However, the actual behavior is that it remains stuck on "Thinking," forcing the user to manually cancel the request, restart the CLI, or try again. This affects normal usage because it interrupts the workflow and makes the tool unreliable. Please investigate whether this issue is related to request timeout handling, network/API delays, or missing error feedback from the CLI.

RAW_BUFFERClick to expand / collapse

What happened?

Gemini CLI sometimes gets stuck on the “Thinking” state and does not return any response. This issue happens intermittently, so it does not occur every time, but when it does happen, the CLI continues processing for a long time without showing any output, error message, or timeout notification. The expected behavior is that Gemini CLI should either return a response within a reasonable amount of time or display a clear error message if the request fails or takes too long. However, the actual behavior is that it remains stuck on "Thinking," forcing the user to manually cancel the request, restart the CLI, or try again. This affects normal usage because it interrupts the workflow and makes the tool unreliable. Please investigate whether this issue is related to request timeout handling, network/API delays, or missing error feedback from the CLI.

What did you expect to happen?

I expected Gemini CLI to process the prompt and return a response within a reasonable time. If the request failed or took too long, I expected it to show a clear error message or timeout notificati

Client information

  • CLI Version: 0.39.1
  • Git Commit: 4d73f3413
  • Session ID: 9c9e6a39-85d9-4c7b-95cb-4e2c4a1d019b
  • Operating System: win32 v24.14.1
  • Sandbox Environment: no sandbox
  • Model Version: auto-gemini-3
  • Auth Type: oauth-personal
  • Memory Usage: 305.5 MB
  • Terminal Name: Unknown
  • Terminal Background: #0c0c0c
  • Kitty Keyboard Protocol: Unsupported

Login information

No response

Anything else we need to know?

No response

extent analysis

TL;DR

Investigate and adjust the request timeout handling in the Gemini CLI to prevent it from getting stuck in the "Thinking" state.

Guidance

  • Review the Gemini CLI configuration and code to identify the current request timeout settings and adjust them to a reasonable value to prevent long waits without feedback.
  • Implement a timeout notification or error message to inform the user when a request takes too long, allowing them to cancel or retry the request.
  • Consider adding logging or debugging statements to track the request processing time and identify potential bottlenecks or delays in the CLI or network/API interactions.
  • Verify that the issue is not related to network or API delays by testing the CLI with different network conditions or API endpoints.

Notes

The root cause of the issue is uncertain, and further investigation is needed to determine whether it is related to request timeout handling, network/API delays, or missing error feedback from the CLI.

Recommendation

Apply a workaround by adjusting the request timeout settings and implementing a timeout notification or error message, as the root cause of the issue is unclear and may require further investigation.

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