gemini-cli - 💡(How to fix) Fix Gemini failed to open in a temporary path A:\ [1 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#25216Fetched 2026-04-13 05:45:50
View on GitHub
Comments
1
Participants
2
Timeline
4
Reactions
0
Author
Timeline (top)
labeled ×3commented ×1

Error Message

An unexpected critical error occurred:Error: EISDIR: illegal operation on a directory, realpath 'A:\a'

Fix Action

Fix / Workaround

✦ I have successfully applied the local patch to fix the EISDIR crash and created a tracking log at C:\Users\Greuceanu\gemini-patch-log.md.

RAW_BUFFERClick to expand / collapse

What happened?

gemini --yolo in pwsh at 15:07:27 An unexpected critical error occurred:Error: EISDIR: illegal operation on a directory, realpath 'A:\a' at async Module.realpath (node:internal/fs/promises:1176:10) at async loadServerHierarchicalMemory (file:///C:/Users/Greuceanu/AppData/Local/nvm/v20.20.2/node_modules/@google/gemini-cli/bundle/chunk-JS5WSGB2.js:51797:33) at async loadCliConfig (file:///C:/Users/Greuceanu/AppData/Local/nvm/v20.20.2/node_modules/@google/gemini-cli/bundle/gemini.js:7690:20) at async main (file:///C:/Users/Greuceanu/AppData/Local/nvm/v20.20.2/node_modules/@google/gemini-cli/bundle/gemini.js:14455:25)

[ACTION REQUIRED] 📎 PLEASE ATTACH THE EXPORTED CHAT HISTORY JSON FILE TO THIS ISSUE IF YOU FEEL COMFORTABLE SHARING IT.

What did you expect to happen?

Start gemini cli A:\ is a virtual drive mounted in windows, gemini failed to open, but it was ok in the past. He suggested some modifications try catch:

✦ I have successfully applied the local patch to fix the EISDIR crash and created a tracking log at C:\Users\Greuceanu\gemini-patch-log.md.

You can now use the Gemini CLI from A:\ or other virtual drives without it crashing during initialization.

Regarding reporting this to the developers: Yes, you definitely should. This is a valid edge case that the core team can fix by adding similar try/catch or non-native fallbacks in the main codebase.

You can report this bug directly from within the CLI by running the following command in your terminal:

1 /bug

This will guide you through submitting a report with the details of the crash and the fix we applied.

Client information

  • CLI Version: 0.37.1
  • Git Commit: 3b2d4f100
  • Session ID: 24bccc82-dd3a-470d-9b0c-373d580e5e2d
  • Operating System: win32 v20.20.2
  • Sandbox Environment: no sandbox
  • Model Version: auto-gemini-3
  • Auth Type: oauth-personal
  • Memory Usage: 205.9 MB
  • Terminal Name: Unknown
  • Terminal Background: #121212
  • Kitty Keyboard Protocol: Unsupported

Login information

No response

Anything else we need to know?

every time i run gemini he is trying to upgrade itself and fails every time, i did some version juggling with nvm use 20.20.2 but the result still fails, maybe this worth more testing and fix

extent analysis

TL;DR

The most likely fix is to report the bug to the developers and apply a try-catch patch to handle the EISDIR error when running the Gemini CLI from a virtual drive.

Guidance

  • The error EISDIR: illegal operation on a directory suggests that the Gemini CLI is attempting to perform an operation on a directory (A:\) that is not allowed.
  • The provided local patch to fix the EISDIR crash may be a temporary solution, but reporting the bug to the developers using the /bug command is recommended to ensure a permanent fix.
  • The issue of the Gemini CLI trying to upgrade itself and failing every time may be related to the version juggling with nvm, and further testing with different versions may be necessary to resolve this issue.
  • Consider attaching the exported chat history JSON file to the issue for further debugging and support.

Example

No code snippet is provided as the issue does not require a specific code change, but rather a reporting of the bug and potential application of a patch.

Notes

The provided information suggests that the issue is specific to running the Gemini CLI from a virtual drive on a Windows system, and the fix may not be applicable to other environments or scenarios.

Recommendation

Apply workaround: Report the bug to the developers using the /bug command and apply the local patch to fix the EISDIR crash, as this is the most straightforward solution to resolve the issue in the short term.

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 failed to open in a temporary path A:\ [1 comments, 2 participants]