Gemini CLI freezes mid-session: any fix or workaround?
Gemini CLI 0.12.0 freezes completely mid-session: typing stops, the loading spinner pauses, and only a restart helps. It happens on Mac, Linux, and web terminals, even after a fresh reboot, and one user sees it reliably under tmux. Is there a known fix or workaround?
Originally asked on GitHub: https://github.com/google-gemini/gemini-cli/issues/12650
4 answers
No fix or confirmed workaround appears in this issue. The tracker shows it closed as COMPLETED, but the thread itself contains no patch, flag, or config change, and maintainers were still investigating.
Findings in the thread:
- A maintainer suggested the freeze might be a stuck paste-buffer mode that clears itself after ~30 seconds. One reporter waited 30–45 seconds after a fresh reboot and the CLI was still frozen, so that did not help in that case.
- A maintainer confirmed the whole UI is frozen, not just the keyboard: the loading spinner also pauses.
- One user gets the freeze reliably under
tmuxbut not withouttmuxon the same machine. That is the strongest lead so far; it is worth testing outsidetmuxif you use it. - A reporter who rebooted to rule out leftover
geminiprocesses still hit the freeze after the reboot, so stale processes were not the cause for them. - Maintainers asked whether MCP servers or extensions trigger it, but nobody confirmed either way.
For debugging (comment 12): the latest nightly automatically saves session history to
~/.gemini/tmp/<project_hash>/chats/. If you hit the freeze, a maintainer asked for the last couple of messages from the newest JSON file there, redacted, plus a screenshot. That data may reveal whether a bad tool call causes the freeze.Did this work for you?What a GitHub user tried on GitHub (Worked)
Close and restart the Gemini CLI; the reporter says this is the only way to regain input when the UI freezes.
Source: https://github.com/google-gemini/gemini-cli/issues/12650 (opens external site)
Did this work for you?What @tdevaux tried on GitHub (Didn't work)
Rebooted the workstation to clear possible zombie gemini processes; the freeze still recurred afterwards, so stale processes were not the cause for that user.
Did this work for you?What @tdevaux tried on GitHub (Didn't work)
After a fresh reboot, waited 30–45 seconds while frozen (as a maintainer suggested a stuck paste-buffer mode might time out); the CLI was still frozen.
Did this work for you?
Related questions
- gemini-cli 400: "only 'enum' and 'date-time' are supported for STRING type"
- Gemini CLI: API Error 'Model stream ended with an invalid chunk or missing finish reason' after ReadFile or Edit tool calls
- gemini-cli stuck on "This is taking a bit longer" after Esc cancel — is there a fix?
- Is there a way to get codebase indexing in gemini-cli?
- How can I use voice input instead of typing with Gemini CLI?