Symptoms
- Windsurf is noticeably slow or laggy when connected to WSL
- The editor frequently disconnects from the WSL backend and attempts to reconnect
- Disconnections occur during active development (e.g., while using Cascade) and while the editor is idle
- Windsurf crashes or becomes unresponsive, requiring a restart of both the IDE and WSL (
wsl --shutdown) - WSL memory usage grows over time, even on systems with 32 GB+ of RAM
- WSL diagnostic logs show large numbers of
P9 Reply_Rlerrorevents (file-not-found errors) - Performance is normal when using Windsurf outside of WSL (e.g., opening a local Windows folder)
- Common workarounds (restarting WSL, reinstalling Windsurf, increasing
.wslconfigmemory) do not resolve the issue on their own
Root Cause
Communication between Windows and the WSL Linux filesystem uses the Plan 9 (9P) protocol, which has limited throughput compared to native filesystem access. When extensions are installed in the WSL environment, some perform aggressive file watching and indexing across the entire workspace. In large repositories (e.g., 250,000+ files, 5+ GB), this generates a massive volume of filesystem operations over the 9P bridge, which can:- Saturate the protocol’s capacity
- Produce thousands of file-not-found errors (
Reply_Rlerror) - Cause the connection between Windsurf and the WSL backend to drop
- Contribute to growing memory pressure inside WSL over time
Solutions
1. Clean reinstall of the Windsurf server in WSL
Delete the Windsurf server directory inside WSL and let Windsurf reinstall it on next connection:2. Minimize installed extensions (highest impact)
Only install extensions you actively need for the repository you are working in.- Open the Extensions panel in Windsurf while connected to WSL
- Review which extensions are installed in the WSL environment (not just locally)
- Disable or uninstall extensions you do not need—especially those that perform heavy file watching or indexing
- Vue (Volar) — confirmed to cause excessive file indexing over the 9P bridge, even in non-Vue projects. Uninstalling this extension alone has resolved disconnections for multiple users.
- Other framework-specific language extensions (Angular, Svelte, etc.) may behave similarly if installed but not needed for the current workspace.
3. Optimize WSL resource limits
Create or edit the file%USERPROFILE%\.wslconfig on your Windows host (e.g., C:\Users\<YourUser>\.wslconfig) with resource limits appropriate for your system:
Diagnosis
Check WSL diagnostic logs for 9P errors
To confirm that 9P saturation is the cause, collect WSL diagnostic logs:Reply_Rlerror events in the 9P/filesystem logs. Thousands (or more) typically indicate that extensions or processes inside WSL are generating excessive filesystem requests that the 9P bridge cannot keep up with.
When to use which fix
- Minimize extensions if you have many extensions installed in WSL that you don’t actively need, or if you migrated extensions from another editor. (Highest-impact change.)
- Clean server reinstall if the Windsurf server state may be corrupted or stale (e.g., after a failed update or previous crash).
- Optimize
.wslconfigif WSL is consuming excessive host resources, or if you have not previously configured resource limits. (General WSL stability improvement.)