gemini-cli - 💡(How to fix) Fix [gemini-3.1-pro-preview][Win10/WSL2] Model over-escalates transient network timeout to critical deadlock — instructs unnecessary wsl --shutdown [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#26154Fetched 2026-04-29 06:35:21
View on GitHub
Comments
0
Participants
1
Timeline
4
Reactions
0
Author
Participants
Timeline (top)
cross-referenced ×3labeled ×1

Error Message

  1. powershell.exe — which returned Exec format error (intermittent WSL interop issue)
  • Transient powershell.exe interop error (intermittent, self-resolving)
  1. powershell.exe Exec format error: Fall back to Linux-only tools, retry once

Root Cause

A user who trusts the model's diagnosis and runs wsl --shutdown will:

  • Lose their active CLI session and all context
  • Kill any background processes (cron jobs, MCP servers, etc.)
  • Spend 2-3 minutes waiting for WSL to restart

All for a network blip that would have resolved itself.

This is a model judgment/escalation issue, not just a CLI bug. The model needs better heuristics for distinguishing transient errors from actual system failures in WSL2 environments.

Code Example

✦ 대표님, 현재 WSL(Linux) 터미널과 Windows Host 간의 I/O 브릿지가 붕괴된 치명적 데드락 상태가 감지되었습니다.

시스템 자율 검증 결과, Windows의 powershell.exe 및 cmd.exe 실행 시 Exec format error가 발생하며,
/mnt/g 경로 역시 마운트가 해제되어 G 드라이브에 접근할 수 없는 100% 연결 거부 상태입니다.

🚨 Windows PowerShell (관리자 권한)에서 wsl --shutdown 명령어로 커널을 강제 초기화(물리적 리부팅)하여
I/O 병목을 해소해 주십시오.

---

context:   5% used    ← session fully alive
quota:     4% used    ← no throttling
ping 8.8.8.8:  0% packet loss, 26ms  ← internet working
WSL status:    Running normally
RAW_BUFFERClick to expand / collapse

⚠️ CORRECTION: Model Name & OS Were Incorrect in All Previous Reports

Correcting factual errors from earlier reports:

  • Model reported as: "Gemini 2.5 Pro" → Actual: gemini-3.1-pro-preview
  • OS reported as: "Windows 11" → Actual: Windows 10

[gemini-3.1-pro-preview][Win10/WSL2] Model over-escalates WSL network timeout to "critical system deadlock" — instructs unnecessary wsl --shutdown

Environment: Windows 10 + WSL2 Ubuntu 24.04, gemini-3.1-pro-preview, Gemini CLI v0.40.0

What Happened

During a --yolo session in ~/projects/WM, WSL intermittently experienced network connectivity issues (TLS handshake timeouts to GitHub, git operations hanging). This is a known transient WSL network issue — ping to 8.8.8.8 was 100% successful throughout.

The model (gemini-3.1-pro-preview) also attempted to access:

  1. /mnt/g — a drive letter that is not mounted in this WSL instance
  2. powershell.exe — which returned Exec format error (intermittent WSL interop issue)

The model then declared a "치명적 데드락 (Critical Deadlock)" and instructed the user to immediately perform wsl --shutdown from an elevated PowerShell.

CLI Output at Time of Escalation

✦ 대표님, 현재 WSL(Linux) 터미널과 Windows Host 간의 I/O 브릿지가 붕괴된 치명적 데드락 상태가 감지되었습니다.

시스템 자율 검증 결과, Windows의 powershell.exe 및 cmd.exe 실행 시 Exec format error가 발생하며,
/mnt/g 경로 역시 마운트가 해제되어 G 드라이브에 접근할 수 없는 100% 연결 거부 상태입니다.

🚨 Windows PowerShell (관리자 권한)에서 wsl --shutdown 명령어로 커널을 강제 초기화(물리적 리부팅)하여
I/O 병목을 해소해 주십시오.

Actual System State

context:   5% used    ← session fully alive
quota:     4% used    ← no throttling
ping 8.8.8.8:  0% packet loss, 26ms  ← internet working
WSL status:    Running normally

The Real Problem

The model escalated a combination of:

  • Missing drive mount (/mnt/g doesn't exist on this machine)
  • Transient powershell.exe interop error (intermittent, self-resolving)
  • Temporary GitHub TLS timeout (git operations recovered on their own within minutes)

...into an instruction to perform a destructive full WSL restart, which would have killed the active session and all background processes unnecessarily.

The network did recover on its own. The user did NOT need to run wsl --shutdown.

Expected Behavior

When encountering these conditions, the model should:

  1. Missing mount (/mnt/g): Skip gracefully, do not treat as system failure
  2. powershell.exe Exec format error: Fall back to Linux-only tools, retry once
  3. Transient network timeout: Wait and retry (with backoff), inform user of temporary connectivity issue
  4. If escalation is truly needed: Distinguish between "network is temporarily slow" vs "WSL is deadlocked" — these require very different responses

Under no circumstances should a missing drive letter or a 30-second network timeout trigger a recommendation to restart the WSL kernel.

Why This Matters

A user who trusts the model's diagnosis and runs wsl --shutdown will:

  • Lose their active CLI session and all context
  • Kill any background processes (cron jobs, MCP servers, etc.)
  • Spend 2-3 minutes waiting for WSL to restart

All for a network blip that would have resolved itself.

This is a model judgment/escalation issue, not just a CLI bug. The model needs better heuristics for distinguishing transient errors from actual system failures in WSL2 environments.

Related Issues

  • #26111 (WSL2 reliability cascade)
  • #26117 (comprehensive 7-incident report)

extent analysis

TL;DR

The model's escalation logic needs to be improved to distinguish between transient errors and actual system failures in WSL2 environments, preventing unnecessary wsl --shutdown instructions.

Guidance

  • Review the model's current escalation heuristics to identify why it's treating missing drive mounts, transient powershell.exe errors, and temporary network timeouts as critical system failures.
  • Implement a more nuanced approach to error handling, such as:
    • Skipping missing mounts without escalating
    • Retrying powershell.exe commands with a fallback to Linux-only tools
    • Implementing a backoff strategy for transient network timeouts
  • Consider adding a "temporary connectivity issue" notification to inform users of network blips without recommending drastic actions.

Example

No code example is provided as the issue is related to the model's logic and heuristics, rather than a specific code snippet.

Notes

The model's current behavior may lead to unnecessary data loss and disruption of user workflows. Improving the escalation logic will require a thorough review of the model's decision-making process and potentially significant changes to its architecture.

Recommendation

Apply a workaround by modifying the model's escalation logic to better handle transient errors and distinguish between actual system failures and temporary issues. This will prevent unnecessary wsl --shutdown instructions and improve the overall user experience.

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