Where does the bug appear (feature/product)?
Cursor IDE
Describe the Bug
In a Remote-WSL window under WSL2 networkingMode=mirrored, the Management connection drops and
reconnects every ~20.5 s, indefinitely, starting 20 s after the first connect. Agent chat hangs on
“Taking longer than expected” / “Planning next moves” and then fails with:
The agent execution provider did not respond in time. This may indicate the extension host is not
running or is unresponsive.
Renderer log, every cycle:
[remote-connection][Management][…][reconnect] received socket timeout event (unacknowledgedMsgCount: 1886, timeSinceOldestUnacknowledgedMsg: 20502, timeSinceLastReceivedSomeData: 20425)
[remote-connection][Management][…][reconnect] starting reconnecting loop.
[remote-connection][Management][…][reconnect] reconnected!
unacknowledgedMsgCount grows by a constant ~1876 per cycle and never resets (1886, 3762, 5638 …
230,808 after two hours). The ExtensionHost connection to the same server/port never drops. Server-side
remoteagent.log shows “[ManagementConnection] The client has reconnected.” every 20.5 s, and the remote
extension host never gets far enough to write exthost1/ logs. One Windows socket leaks per cycle
(ESTABLISHED forever; 640+ observed).
ROOT CAUSE (instrumented, reproduced without Cursor):
- anysphere.remote-wsl resolves the authority as
new ResolvedAuthority("127.0.0.1", port, token).
Under mirrored networking, Windows→WSL 127.0.0.1 traffic is carried by Microsoft’s user-mode relay
wslrelay.exe --mode 1. - At connect, the server sends ~1.69 MB on the Management channel — two single protocol messages of
849,769 B (scanExtensions result) and 835,553 B (getInstalled result), chunked into 256 KB WebSocket
frames — WHILE the client is sending ~700 KB of remoteFilesystem.readFileStream / watch / stat RPCs to
restore its editors (≈1,900 messages in the first second). - wslrelay.exe deadlocks when both directions carry bulk data concurrently (measured thresholds: roughly
≥300–600 KB one way and ≥200–300 KB the other). Chromium NetLog (–log-net-log) shows the network
service receiving two 256 KB frames and then nothing; it logs 661,911 B sent while the server receives
only 33,745 B per cycle;sson the server socket shows rwnd_limited: 100%. - After the 20 s keepalive timeout, PersistentProtocol reconnects and BOTH sides replay their entire
unacknowledged backlog at once (endAcceptReconnection) — exactly the pattern that deadlocks the relay —
so the loop never exits, and every replay leaks another socket.
This reproduces with a 30-line Python server + PowerShell client and no Cursor involved; the same
transfer via the host’s mirrored IP completes normally.
Steps to Reproduce
- WSL2 with
networkingMode=mirroredin .wslconfig. - Open a Remote-WSL window on a workspace with a few hundred restored editors (in my case ~218 open
files across several folders) — enough that the workbench issues ~700 KB of file-read RPCs at connect. - Start an agent chat, or just watch Help > Toggle Developer Tools / the renderer log.
No other extensions are required: the loop reproduces with --disable-extension on every user and built-in
extension, and from the first 20 seconds of every fresh session.
Expected Behavior
The Remote-WSL connection stays up; agent requests complete.
Operating System
Other
Version Information
Cursor 3.21.18 (commit c4730f7d93d787d9ab120af715999f0345ee5bc0, VS Code 1.128.0, built 2026-09-22)
Also reproduced on 3.17.19 (commit ae3a2b7231dd56194447fe4570dfdc61640b1e90) before updating.
Remote-WSL extension: anysphere.remote-wsl 1.0.13 (unchanged across both client versions)
Windows 11 build 10.0.26200.8875 (x64); WSL 2.7.14.0, kernel 6.18.33.2-microsoft-standard-WSL2, Ubuntu 24.04
.wslconfig: networkingMode=mirrored, dnsTunneling=true
For AI issues: which model did you use?
N/A — connection-layer issue; any model fails the same way.
For AI issues: add Request ID with privacy disabled
81f49275-e578-429c-9376-a1f745abe7c8
87fbc4ea-72c4-4ff8-ba35-e686d087b22c
Additional Information
CONSOLE ERRORS (renderer.log / Developer Tools, during the loop)
[error] Error: No Connect transport provider registered.
at async forceRefreshServerConfig (…/out/vs/workbench/workbench.glass.main.js)
at async createSingleServer …
[warning] [agent-exec] Provider registration timed out (attempt 6/9, timeout=5000ms), retrying
[warning] [agent-exec] Provider registration timed out (attempt 7/9, timeout=5000ms), retrying
[warning] [agent-exec] Provider registration timed out (attempt 8/9, timeout=5000ms), retrying
[warning] [WorktreeManager] Timed out waiting for git context provider, skipping worktree discovery
[error] {“isTrusted”:true}
[info] [remote-connection][Management][…][reconnect] received socket close event (wasClean: false, code: 1006, reason: )
WORKAROUND (verified: 0 reconnects where it was previously 100% reproducible)
- Setting “remote.WSL.serverListenAddress”: “0.0.0.0” — this setting already exists and its own
description says it is for networkingMode=mirrored. - Edit anysphere.remote-wsl-1.0.13/dist/main.js: replace
ResolvedAuthority(“127.0.0.1”
with
ResolvedAuthority(“HOST_IP”
where HOST_IP is the host’s own (mirrored) IPv4 address. resolveAuthority(wsl) then returns
WebSocket(HOST_IP:PORT), the server sees the peer as the vEthernet address, and the loop is gone.
Obviously fragile (hard-coded IP, undone by extension updates) — hence this report.
REQUEST
- Add a remote.WSL.connectAddress setting (or remote.WSL.connectThroughLocalhost: false), or
automatically use the host’s mirrored IP when networkingMode=mirrored is detected. The
serverListenAddress=0.0.0.0 half already exists; the connect half is missing. - Consider chunking or deferring the two ~850 KB extension-scan messages sent at connect. Even after
Microsoft fixes the relay, sending 1.7 MB in two messages while the workbench restores editors — and
replaying all of it on every reconnect — amplifies any transport hiccup into a hard loop.
Does this stop you from using Cursor
Yes - Cursor is unusable