claude-code - 💡(How to fix) Fix [BUG] [Windows] Claude Code 2.1.139 still hangs after all documented workarounds (spawn EINVAL, blank -p output, interactive hang)

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…

On native Windows with @anthropic-ai/claude-code 2.1.139, both the VS Code extension and the native CLI remain unusable after applying every documented workaround. This is a regression that's been live since at least 2026-04-18 (see #50616, closed as duplicate but with symptoms unresolved on the affected machine).

Error Message

  1. VS Code sidebar: every session fails with Error: spawn EINVAL.

Root Cause

On native Windows with @anthropic-ai/claude-code 2.1.139, both the VS Code extension and the native CLI remain unusable after applying every documented workaround. This is a regression that's been live since at least 2026-04-18 (see #50616, closed as duplicate but with symptoms unresolved on the affected machine).

Fix Action

Fix / Workaround

Summary

On native Windows with @anthropic-ai/claude-code 2.1.139, both the VS Code extension and the native CLI remain unusable after applying every documented workaround. This is a regression that's been live since at least 2026-04-18 (see #50616, closed as duplicate but with symptoms unresolved on the affected machine).

Workarounds attempted (none resolve the hang)

  • Removed bad local claudeCode.claudeProcessWrapper VS Code setting
  • npm install -g @anthropic-ai/[email protected]
  • Set CLAUDE_CODE_GIT_BASH_PATH=C:\Program Files\Git\bin\bash.exe (Windows User env + VS Code claudeCode.environmentVariables)
  • Enabled claudeCode.useTerminal=true

User impact

This is not a minor configuration issue. The VS Code sidebar is the primary interface, and with both it and the fallback CLI broken there is no trusted native-Windows workflow. Sidebar-session work has had to be emergency-recovered. Current personal workaround is SSH into a Linux box for serious work — that's avoiding the product, not a fix.

RAW_BUFFERClick to expand / collapse

Summary

On native Windows with @anthropic-ai/claude-code 2.1.139, both the VS Code extension and the native CLI remain unusable after applying every documented workaround. This is a regression that's been live since at least 2026-04-18 (see #50616, closed as duplicate but with symptoms unresolved on the affected machine).

Environment

  • Windows (version unconfirmed)
  • PowerShell
  • @anthropic-ai/claude-code 2.1.139 (claude --version confirms)
  • VS Code with Claude Code extension
  • Git Bash at C:\Program Files\Git\bin\bash.exe

Symptoms

  1. VS Code sidebar: every session fails with Error: spawn EINVAL.
  2. Non-interactive CLI: claude -p "Respond with exactly OK" exits 0 with blank stdout.
  3. Interactive CLI: claude from PS C:\Arduino> spawns C:\Users\<user>\AppData\Roaming\npm\node_modules\@anthropic-ai\claude-code\bin\claude.exe (observed PID 26060) and produces no visible response until the process is killed externally.

Workarounds attempted (none resolve the hang)

  • Removed bad local claudeCode.claudeProcessWrapper VS Code setting
  • npm install -g @anthropic-ai/[email protected]
  • Set CLAUDE_CODE_GIT_BASH_PATH=C:\Program Files\Git\bin\bash.exe (Windows User env + VS Code claudeCode.environmentVariables)
  • Enabled claudeCode.useTerminal=true

User impact

This is not a minor configuration issue. The VS Code sidebar is the primary interface, and with both it and the fallback CLI broken there is no trusted native-Windows workflow. Sidebar-session work has had to be emergency-recovered. Current personal workaround is SSH into a Linux box for serious work — that's avoiding the product, not a fix.

Please treat as an active Windows reliability outage rather than a duplicate of a closed thread. Happy to provide debug logs, environment dumps, or attempt requested diagnostics.

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