[BUG] Frequent session freezes / connection drops on Claude Code (VS Code extension) under
Preflight Checklist
- [x] I have searched existing issues and this hasn't been reported yet
- [x] This is a single bug report (please file separate reports for different bugs)
- [x] I am using the latest version of Claude Code
What's Wrong?
Title: Frequent session freezes / connection drops on Claude Code (VS Code extension) under WSL2
Versions
- Claude Code CLI: 2.1.150
- Surface: VS Code native extension (vscode-server / WSL remote)
- Model: Opus 4.8 (1M context) — claude-opus-4-8[1m]
- Node: v22.18.0
- npm: 10.9.3
- Bun: bundled inside the CLI (not on PATH)
- WSL: 2.7.3.0
- WSL kernel: 6.6.114.1-microsoft-standard-WSL2 (x86_64)
- WSLg: 1.0.73 | MSRDC: 1.2.6676 | Direct3D: 1.611.1-81528511
- Distro: Ubuntu 22.04.5 LTS
- Windows: 10.0.26200.7840
- WSL networking: NAT mode (mirrored mode is NOT usable — see notes)
Summary
Sessions freeze / hang very frequently during normal use. The UI appears to
stall mid-turn, and in some cases the underlying connection drops with a
"socket closed" type error. This happens multiple times within a single
working session, sometimes seconds apart, badly disrupting the workflow.
Frequency
Very high — repeated stalls within the same session, multiple times per hour.
Suspected cause
Appears related to the keepalive / socket handling of the underlying runtime
(Bun) when running through the WSL2 networking stack. Long-lived connections
seem to drop unexpectedly.
Expected behavior
Sessions should stay responsive and connections stable across a normal
working session in WSL2, without repeated freezes or dropped sockets.
Actual behavior
The session freezes repeatedly; work is interrupted and has to be resumed,
sometimes losing the in-progress turn.
Notes / mitigations tried
- WSL "mirrored" networking mode is NOT a viable workaround: enabling it
broke the WSL environment entirely, so it had to be reverted. Please do not
suggest mirrored mode as a fix.
- Tuning keepalive-related environment variables in ~/.claude/settings.json
was attempted as a mitigation, with limited effect.
Impact
Severe day-to-day productivity impact. Requesting prioritization for WSL2
stability.
What Should Happen?
Title: Frequent session freezes / connection drops on Claude Code (VS Code extension) under WSL2
Versions
- Claude Code CLI: 2.1.150
- Surface: VS Code native extension (vscode-server / WSL remote)
- Model: Opus 4.8 (1M context) — claude-opus-4-8[1m]
- Node: v22.18.0
- npm: 10.9.3
- Bun: bundled inside the CLI (not on PATH)
- WSL: 2.7.3.0
- WSL kernel: 6.6.114.1-microsoft-standard-WSL2 (x86_64)
- WSLg: 1.0.73 | MSRDC: 1.2.6676 | Direct3D: 1.611.1-81528511
- Distro: Ubuntu 22.04.5 LTS
- Windows: 10.0.26200.7840
- WSL networking: NAT mode (mirrored mode is NOT usable — see notes)
Summary
Sessions freeze / hang very frequently during normal use. The UI appears to
stall mid-turn, and in some cases the underlying connection drops with a
"socket closed" type error. This happens multiple times within a single
working session, sometimes seconds apart, badly disrupting the workflow.
Frequency
Very high — repeated stalls within the same session, multiple times per hour.
Suspected cause
Appears related to the keepalive / socket handling of the underlying runtime
(Bun) when running through the WSL2 networking stack. Long-lived connections
seem to drop unexpectedly.
Expected behavior
Sessions should stay responsive and connections stable across a normal
working session in WSL2, without repeated freezes or dropped sockets.
Actual behavior
The session freezes repeatedly; work is interrupted and has to be resumed,
sometimes losing the in-progress turn.
Notes / mitigations tried
- WSL "mirrored" networking mode is NOT a viable workaround: enabling it
broke the WSL environment entirely, so it had to be reverted. Please do not
suggest mirrored mode as a fix.
- Tuning keepalive-related environment variables in ~/.claude/settings.json
was attempted as a mitigation, with limited effect.
Impact
Severe day-to-day productivity impact. Requesting prioritization for WSL2
stability.
Error Messages/Logs
Steps to Reproduce
Just try to use Claude for 2 minutes!!!!!
Claude Model
None
Is this a regression?
Yes, this worked in a previous version
Last Working Version
_No response_
Claude Code Version
2.1.150 (Claude Code)
Platform
Anthropic API
Operating System
Windows
Terminal/Shell
WSL (Windows Subsystem for Linux)
Additional Information
_No response_
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗