gemini-cli - 💡(How to fix) Fix Embedded Gemini CLI Terminal Freezes/Glitches After Background Process Commands on Windows

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…

Code Example

> /about
#                                                                                                                                                  │
About Gemini CLI│                                                                                                                                                 │
CLI Version                                       0.42.0Git Commit                                        68e2196d5                                                                                     │
Model                                             gemini-3-flash-preview                                                                        │
Sandbox                                           no sandbox                                                                                    │
OS                                                win32                                                                                         │
Auth Method                                       Signed in with GoogleTier                                              Gemini Code Assist for individuals                                                            │
│                                                                                                                                                 │
RAW_BUFFERClick to expand / collapse

What happened?

While using the embedded Gemini CLI terminal inside the application on Windows, the terminal becomes glitched/frozen after executing certain shell commands related to process management or local build execution.

In my case, the issue occurred after Gemini CLI attempted to run:

taskkill /F /IM node.exe

After this command:

  • the terminal entered a stuck "Thinking..." state
  • terminal interaction became unstable
  • subprocess/background process handling appeared desynchronized
  • the UI still showed active background processes
  • the session did not recover correctly
  • command execution/input became unreliable

This issue appears more frequently during workflows where Docker is intentionally avoided and Gemini CLI attempts to fully execute/build projects natively on the local Windows system.

The embedded terminal seems unable to properly recover from certain long-running or subprocess-related shell commands.

What did you expect to happen?

I expected the embedded Gemini CLI terminal to properly handle shell/process-management commands without freezing or entering a broken state.

Expected behavior:

  • Gemini CLI should continue functioning normally after subprocess commands
  • terminal input/output should remain responsive
  • background processes should clean up correctly
  • the UI should stay synchronized with the actual terminal state
  • long-running or native local build workflows should not permanently break the terminal session

The workflow should behave similarly to running the same commands inside a normal external PowerShell/Windows terminal.

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.42.0                                                                                        │
│ Git Commit                                        68e2196d5                                                                                     │
│ Model                                             gemini-3-flash-preview                                                                        │
│ Sandbox                                           no sandbox                                                                                    │
│ OS                                                win32                                                                                         │
│ Auth Method                                       Signed in with Google                                                  │
│ Tier                                              Gemini Code Assist for individuals                                                            │
│                                                                                                                                                 │
</details>

Login information

Using Gemini CLI with Google account authentication.

Anything else we need to know?

Attached screenshot shows the issue occurring after Gemini CLI attempted to run:

taskkill /F /IM node.exe

The terminal then entered a stuck/glitched state while still showing:

"3 Background processes"

The UI remained partially responsive, but terminal execution and subprocess handling appeared desynchronized from the actual process state.

This may be related to:

  • PTY/session handling
  • subprocess cleanup
  • Windows terminal integration
  • background process synchronization
  • embedded shell state recovery

The issue becomes especially noticeable during native local execution workflows where Docker is intentionally avoided and Gemini CLI attempts to build/install projects directly on the host system.

<img width="1503" height="356" alt="Image" src="https://github.com/user-attachments/assets/9f2b945e-0c7d-4578-904f-e49ebda3c605" />

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 Embedded Gemini CLI Terminal Freezes/Glitches After Background Process Commands on Windows