Remote-SSH on Windows: reconnect hangs on Installing — lock/tar.gz held after disconnect

Where does the bug appear (feature/product)?

Cursor IDE

Describe the Bug

After a successful Remote-SSH session to a Windows host, reconnecting often hangs on “Installing Remote Server…”.

Logs repeatedly try to acquire cursor-remote.lock under the remote .cursor-server bin folder, then fail with could not acquire lock after 120 attempts. The lock (and often cursor-server.tar.gz) stays in use even when no node process is visible; deleting/renaming .cursor-server fails with “file in use”.

A reboot sometimes allows one successful connect. Disconnecting in Cursor and reconnecting without reboot reproduces the hang. Plain SSH works when the LAN is fine — this is Cursor server install locking, not OpenSSH auth.

remote.SSH.remotePlatform is set to windows (confirmed in logs). Anysphere Remote-SSH recent 1.x.

Steps to Reproduce

  1. Connect Remote-SSH from Windows Cursor to a Windows OpenSSH host successfully.
  2. Disconnect (Close Remote), or update Cursor while still connected, or shut down the local PC without a clean disconnect.
  3. Reconnect to the same host.
  4. Observe hang on “Installing Remote Server…”.
  5. On the remote host: cursor-remote.lock and/or cursor-server.tar.gz cannot be deleted (in use). Ending the holding process and clearing .cursor-server allows one reconnect; disconnect + reconnect fails again.

Expected Behavior

After disconnect or local restart, the remote install lock and leftover install subprocesses should be released so reconnect reuses or cleanly reinstalls the Cursor Server without hanging on Installing.

Operating System

Windows 10/11

Version Information

3.24.12 (user setup)

Does this stop you from using Cursor

Yes - Cursor is unusable

Hey, thanks for the detailed report and repro steps. Separating this from OpenSSH and the network was really helpful.

I passed this to the team. It looks like on Windows hosts, the server install step may keep that lock file open from a PowerShell process. If that PowerShell, or the step extracting cursor-server.tar.gz, keeps running after the SSH session closes, the next connection can’t get the lock. That would explain why no node process shows up and why a reboot fixes it once.

To confirm, could you do this on the remote Windows host while reconnect is stuck on “Installing Remote Server…”?

  1. Press Win+R, type resmon, then press Enter.
  2. Open the CPU tab and expand Associated Handles.
  3. In the search box, enter cursor-remote.lock, then separately cursor-server.tar.gz.
  4. Note the Image name and PID for every process in the list. We’d expect powershell.exe or tar.exe.
  5. Right-click each one, choose End Process, then try connecting again.

Please send:

  • The process names and PIDs from step 4, and whether step 5 let you connect without a reboot.
  • The Remote-SSH log from the failed reconnect. In the Output panel, pick “Remote - SSH” from the dropdown. The first ~80 lines are enough.
  • Whether the Agents Window is connected to the same host at the same time. Two windows connecting at once can race for the same lock.

For now, ending those processes in Resource Monitor should save you from needing a reboot. This should also happen less often if you wait for “Installing” to finish before disconnecting or updating Cursor.

Thanks for your attention.

Follow-up (2026-10-14) — matches your PowerShell/lock hypothesis; timeout + Agents Window

Trigger: updated Cursor while still connected over Remote-SSH. Then stuck on “Installing Remote Server…”.

Resource Monitor (remote Windows host, while Installing)

  • cursor-remote.lock → powershell.exe, PID 6640
  • cursor-server.tar.gz → same powershell.exe, PID 6640

Ending that process alone was not enough. I fully quit Cursor locally (no Cursor processes left), then ended the remote PowerShell again; new powershell.exe processes still appeared on the remote and Installing stayed stuck / failed.

In general I use Agents Window on this remote host (not only a normal editor window), meanwhile IDE Window has the same problem.

Contrast with normal shutdown (no update)

On these days (after I post on October 11), if I am connected, close the window (without Close Remote), shut down the local PC, then power on later, reconnect often works normally. So unclean local shutdown alone does not always reproduce this. This failure followed updating Cursor while still connected.

Remote-SSH log (redacted)

2026-10-14 10:43:20.223 [info] Resolving ssh remote authority ‘’ (attempt #1)
2026-10-14 10:43:20.223 [info] Using configured platform windows for remote host
2026-10-14 10:43:20.223 [info] Using askpass script: .cursor\extensions\anysphere.remote-ssh-1.1.16\dist\scripts\launchSSHAskpass.bat
2026-10-14 10:43:20.226 [info] Compressed install script from 10486 to 5844 characters
2026-10-14 10:43:20.293 [info] Launching SSH server via shell with command: type “\AppData\Local\Temp\cursor_remote_install_.ps1” | ssh -T -D powershell -NoLogo -NoProfile -NonInteractive -Command -
2026-10-14 10:43:20.293 [info] Waiting for SSH handshake (timeout: 120s). Install timeout: 30s.
2026-10-14 10:43:21.440 [info] (ssh_tunnel) stdout: Configuring Cursor Server on Remote
Server data directory: .cursor-server
2026-10-14 10:43:21.440 [info] SSH connection established after 1146ms (first stdout received)
2026-10-14 10:43:21.441 [info] (ssh_tunnel) stdout:
Directory: .cursor-server\bin\win32-x64
d----- 2026/10/14 10:43 be4c9e5350d77747b42cd467cbd3370a753d4640
Acquiring lock .cursor-server\bin\win32-x64\be4c9e5350d77747b42cd467cbd3370a753d4640\cursor-remote.lock
Lock acquired
Downloading from cursor.blob.core.windows.net/remote-releases
2026-10-14 10:44:21.816 [error] Error installing server: Failed to install server within the timeout
2026-10-14 10:44:21.818 [error] Error resolving SSH authority Failed to install server within the timeout

2026-10-14 10:44:23.057 [info] Resolving ssh remote authority ‘’ (attempt #2)
2026-10-14 10:44:23.058 [error] Could not re-establish forwarding; re-establishing entire SSH connection Local code port is not set
2026-10-14 10:44:23.191 [info] Waiting for SSH handshake (timeout: 120s). Install timeout: 30s.
2026-10-14 10:44:24.696 [info] SSH connection established after 1503ms
Acquiring lock …\be4c9e5350d77747b42cd467cbd3370a753d4640\cursor-remote.lock
Install in progress - Open failed: file ‘…cursor-remote.lock’ is being used by another process
(repeated)

Summary

  1. Install PowerShell holds lock + tar.gz (as you expected).
  2. Download starts, then fails with install timeout (~60s; log shows Install timeout: 30s).
  3. Immediate retry races the same lock.
  4. After a full local quit, new remote PowerShell still appeared (Agents Window / install race?).

Hey, thanks for the detailed follow-up. From the log and the Resource Monitor data, the picture is much clearer now.

It looks like after a Cursor update, the commit changes, and the remote host starts downloading vscode-reh-win32-x64.tar.gz again. The lock is taken before the download starts. The download does not finish before the install timeout on the client side, and in your case the error shows up after about 60 seconds, so the client immediately starts attempt #2. Meanwhile, the first powershell.exe is still downloading the file and holding both the lock and the tar.gz file. That is why killing one process did not help. Every new attempt, whether from Agents Window or from the IDE window, starts a new PowerShell process, and the same loop repeats.

Until this is fixed, you can work around it by skipping the download on the remote host side and placing the server files there manually:

  1. Close all Cursor windows connected to this host, including Agents Window, so no new attempts start.
  2. On the remote host, use resmon to end all powershell.exe processes that are holding cursor-remote.lock or cursor-server.tar.gz.
  3. On your local PC, download the file from the URL in your log:
    https://cursor.blob.core.windows.net/remote-releases/be4c9e5350d77747b42cd467cbd3370a753d4640/vscode-reh-win32-x64.tar.gz
  4. Copy it to the remote host, for example with scp, then run these commands in PowerShell on the remote host. Replace $D with the path from the Server data directory line in your log:
    $D = "$env:USERPROFILE\.cursor-server\bin\win32-x64\be4c9e5350d77747b42cd467cbd3370a753d4640"
    Remove-Item -Recurse -Force $D -ErrorAction SilentlyContinue
    New-Item -ItemType Directory -Path $D | Out-Null
    tar -xzf C:\path\to\vscode-reh-win32-x64.tar.gz -C $D --strip-components=1
    dir $D
    
    After extraction, node.exe should be present in $D.
  5. Reconnect to the host from one normal IDE window first and wait for it to connect. Open Agents Window only after that.

After each Cursor update, the commit changes. You can see it in Help > About. So if the download is slow, you may need to repeat these steps with the new commit in the URL and path.

Let me know if this helped. It would also be useful to know how long this file takes to download directly on the remote host, for example with Measure-Command { Invoke-WebRequest <URL> -OutFile test.tar.gz }. That would help confirm whether the issue is download speed.