Skip to content

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

@RogerZoe

Description

@RogerZoe

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions