microsoft / microsoft/WSL

WSL2 becomes unstable for IDE workloads (VS Code Remote reconnect loop) when running Cairo/StarkNet tooling – root cause unclear

Open
#14,175 3 comments 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
33.7k
Forks
1.8k
Avg merge
3d 17h
Merged PRs (30d)
116

Description

## Environment

```
WSL version: 2.6.3.0
Kernel version: 6.6.87.2-1
WSLg version: 1.0.71
MSRDC version: 1.2.6353
Direct3D version: 1.611.1-81528511
DXCore version: 10.0.26100.1
Windows version: 10.0.26220.7653
```

* Distro: Ubuntu (WSL2)
* IDE: VS Code (latest stable)
* Extension: Remote – WSL
* Also tested: Cursor IDE (same behavior)
* Workload: Cairo / StarkNet development (Scarb, Rust-based tooling)

---

## Problem Description

WSL2 intermittently enters a state where IDEs using the WSL server fail to connect reliably.

When opening VS Code (or Cursor) with WSL integration enabled:

* VS Code repeatedly shows **“Reconnecting to WSL…”**
* Sometimes reports **“VS Code Server closed unexpectedly”**
* IDE becomes unusable for development
* Restarting VS Code does not fix the issue
* Rebooting Windows does not consistently fix the issue
* `wsl` itself is accessible from Command Prompt

This happens specifically during **Cairo/StarkNet development**, which involves:

* Scarb builds
* Cairo language server
* Rust toolchain
* Heavy filesystem and process activity

---

## Observed Behavior

* WSL terminal works normally
* IDE-based workflows fail
* High CPU usage / fan activity observed
* Cursor IDE exhibits the same behavior (not VS Code–specific)
* Ubuntu inside a VirtualBox VM works without issues on the same machine

This suggests the issue is **not IDE-specific and not hardware-related**.

---

## Why This Is Hard to Debug

* Error messages point to IDE failure rather than WSL state
* No clear indication that the Linux environment is unhealthy
* Common troubleshooting steps (restart WSL, reinstall Remote extension) do not resolve the issue
* Documentation does not mention this failure mode

As a user, it is unclear:

* whether this is a kernel issue
* a distro lifecycle issue
* a WSL update incompatibility
* or a known limitation under heavy workloads

---

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the reconnect loop with WSL2 Ubuntu, VS Code Remote–WSL or Cursor, and the Cairo/StarkNet workload described here. Investigate whether the failure tracks the WSL kernel, distro lifecycle, WSL update compatibility, or heavy filesystem and process activity; done means identifying a reproducible cause and documenting the relevant mitigation or limitation.

Written by the indexing model from the issue text.

Assessment

Tech stack
linux, rust, ubuntu, vscode
Domain
developer-experience, devtools, operating-systems
Issue type
Bug
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.