gemini-cli - 💡(How to fix) Fix [CRITICAL] CLI crashes on keystroke in WSL due to 9P PATH crawling (v0.39.1) [1 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#26091Fetched 2026-04-29 06:36:10
View on GitHub
Comments
0
Participants
1
Timeline
2
Reactions
0
Author
Participants
Timeline (top)
cross-referenced ×1labeled ×1

Error Message

[WARN] Skipping unreadable directory: /mnt/c/System Volume Information (EACCES: permission denied, scandir '/mnt/c/System Volume Information') [WARN] Skipping unreadable directory: /mnt/c/$Recycle.Bin/...

Root Cause

The Bug: By default, WSL appends Windows system paths (like /mnt/c/Windows/System32) to the Linux $PATH. When typing in the Gemini CLI, the enablePromptCompletion feature attempts to scan the entire $PATH to provide command suggestions. Because it traverses /mnt/c/ over the extremely slow 9P file system protocol, it not only causes severe performance deadlocks, but it eventually hits restricted Windows system folders and throws fatal EACCES errors, causing the entire Node.js CLI process to exit with Code 1 immediately on keystroke.

Fix Action

Fix / Workaround

Workaround: Users are forced to manually set "enablePromptCompletion": false in settings.json just to type a single word without the CLI crashing.

Code Example

[WARN] Skipping unreadable directory: /mnt/c/System Volume Information (EACCES: permission denied, scandir '/mnt/c/System Volume Information')
[WARN] Skipping unreadable directory: /mnt/c/$Recycle.Bin/...
RAW_BUFFERClick to expand / collapse

URGENT: Fatal Crash in WSL due to $PATH crawling (EACCES on /mnt/c/) in v0.39.1

The new autocomplete/prompt completion feature in v0.39.1 is completely broken on Windows Subsystem for Linux (WSL).

The Bug: By default, WSL appends Windows system paths (like /mnt/c/Windows/System32) to the Linux $PATH. When typing in the Gemini CLI, the enablePromptCompletion feature attempts to scan the entire $PATH to provide command suggestions. Because it traverses /mnt/c/ over the extremely slow 9P file system protocol, it not only causes severe performance deadlocks, but it eventually hits restricted Windows system folders and throws fatal EACCES errors, causing the entire Node.js CLI process to exit with Code 1 immediately on keystroke.

Crash Log Output:

[WARN] Skipping unreadable directory: /mnt/c/System Volume Information (EACCES: permission denied, scandir '/mnt/c/System Volume Information')
[WARN] Skipping unreadable directory: /mnt/c/$Recycle.Bin/...

Workaround: Users are forced to manually set "enablePromptCompletion": false in settings.json just to type a single word without the CLI crashing.

Fix Required: The CLI must NOT recursively crawl or attempt to index executable paths located in /mnt/c/ or /mnt/* when running in a WSL environment. Please implement a WSL-specific path exclusion in the file watcher/indexer.

extent analysis

TL;DR

Exclude WSL-mounted Windows paths from the autocomplete path crawling to prevent fatal crashes.

Guidance

  • Identify and exclude WSL-mounted paths (e.g., /mnt/c/) from the $PATH environment variable used by the autocomplete feature.
  • Implement a WSL-specific path exclusion in the file watcher/indexer to prevent recursive crawling of restricted Windows system folders.
  • Consider adding a check for the WSL environment and adjust the enablePromptCompletion feature accordingly.
  • Verify that the exclusion of WSL-mounted paths resolves the performance deadlocks and EACCES errors.

Example

No code snippet is provided as the issue does not contain sufficient information about the implementation details.

Notes

The solution may require modifications to the Gemini CLI codebase to accommodate WSL-specific path exclusions. The exact implementation details are not provided in the issue.

Recommendation

Apply a workaround by excluding WSL-mounted paths from the autocomplete path crawling, as a permanent fix would require modifications to the Gemini CLI codebase. This approach will prevent fatal crashes and improve performance.

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