gemini-cli icon indicating copy to clipboard operation
gemini-cli copied to clipboard

Gemini CLI: IDE connection error on Windows

Open AnasAfawzy opened this issue 1 year ago • 6 comments

What happened?

Image Image

What did you expect to happen?

I was using Gemini CLI inside my project and asked it to modify a local file. Right after the edit request, the IDE connection dropped and the CLI threw a fetch failed error from undici, ending with an unhandled promise rejection—even though authentication succeeded.

Client information

Client Information

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

> /about
# paste output here

Login information

No response

Anything else we need to know?

No response

AnasAfawzy avatar Sep 25 '25 23:09 AnasAfawzy

Hi, Thanks for filing the bug, how often do you see this issue? Is it consistent or is it intermittent?

Do you happen to have any steps that would let us reproduce this issue consistently?

Could you also share the output of /about this will help us understand which CLI Version, Which OS you are on etc.. to narrow down the scenario.

srithreepo avatar Sep 26 '25 20:09 srithreepo

This is happening to me also, using spec-kit constitution command and as it starts working it fails with that error. And then the CLI stops accepting commands, ESC does not work , and I have to kill the terminal.

Version: 1.104.2 (system setup) Commit: e3a5acfb517a443235981655413d566533107e92 Date: 2025-09-24T11:21:37.073Z Electron: 37.3.1 ElectronBuildId: 12404162 Chromium: 138.0.7204.235 Node.js: 22.18.0 V8: 13.8.258.31-electron.0 OS: Windows_NT x64 10.0.26100

This is the version of my error:

File │ │ C:\Users\win10.cache/vscode-ripgrep/ripgrep-v13.0.0-10-x86_64-pc-windo │ │ ws-msvc.zip has been cached │ │ ℹ Authenticated via "oauth-personal". │ │ ✖ [ERROR] [IDEClient] IDE connection error. The connection was lost │ │ unexpectedly. Please try reconnecting by running /ide enable │ │ fetch failed │ │ ✖ ========================================= │ │ This is an unexpected error. Please file a bug report using the /bug │ │ tool. │ │ CRITICAL: Unhandled Promise Rejection! │ │ ========================================= │ │ Reason: TypeError: fetch failed │ │ Stack trace: │ │ TypeError: fetch failed │ │ at │ │ C:\Users\win10\AppData\Roaming\npm\node_modules@google\gemini-cli\node │ │ _modules\undici\index.js:124:13 │ │ at process.processTicksAndRejections │ │ (node:internal/process/task_queues:105:5) │ │ at async │ │ file:///C:/Users/win10/AppData/Roaming/npm/node_modules/@google/gemini- │ │ cli/node_modules/@google/gemini-cli-core/dist/src/ide/ide-client.js:509 │ │ :30 │ │ at async StreamableHTTPClientTransport.send │ │ (file:///C:/Users/win10/AppData/Roaming/npm/node_modules/@google/gemini │ │ -cli/node_modules/@modelcontextprotocol/sdk/dist/esm/client/streamableH │ │ ttp.js:267:30) (x52)

njimenez avatar Sep 27 '25 12:09 njimenez

I'm having the same problem. After editing a few files, it suddenly gives this error. Neither the ESC key nor any other commands work. I'm forced to quit Gemini CLI. I'm experiencing this problem consistently.

alibalaban avatar Sep 27 '25 13:09 alibalaban

Hi, Thanks for filing the bug, how often do you see this issue? Is it consistent or is it intermittent?

Do you happen to have any steps that would let us reproduce this issue consistently?

Could you also share the output of /about this will help us understand which CLI Version, Which OS you are on etc.. to narrow down the scenario.

This happened when installing the latest update.

Image

AnasAfawzy avatar Sep 28 '25 07:09 AnasAfawzy

Hi, Thanks for filing the bug, how often do you see this issue? Is it consistent or is it intermittent?

Do you happen to have any steps that would let us reproduce this issue consistently?

Could you also share the output of /about this will help us understand which CLI Version, Which OS you are on etc.. to narrow down the scenario.

After I removed version 0.6.1 and installed npm install -g @google/[email protected] It worked very well @galz10 @njimenez @srithreepo

AnasAfawzy avatar Sep 29 '25 09:09 AnasAfawzy

Hi thanks for filing this issue.

To keep all communication in one place, I'm closing this as a duplicate of https://github.com/google-gemini/gemini-cli/issues/10243. Let's continue the discussion there.

As noted in https://github.com/google-gemini/gemini-cli/issues/10243#issuecomment-3352563903, could you please fetch the debug logs and add them to the thread in https://github.com/google-gemini/gemini-cli/issues/10243? That will help us investigate. Thanks!

skeshive avatar Sep 30 '25 14:09 skeshive