Where does the bug appear (feature/product)?
Cursor IDE
Describe the Bug
Summary
Each time the agent runs on the remote host, it resolves the git ref of a plugin marketplace repo using git ls-remote over SSH, with no timeout. On a network where TCP port 22 connects but the SSH greeting never arrives, the call hangs forever. Each hung attempt leaves a git.exe, sh.exe and ssh.exe process behind. I found 325 of each (975 processes) after about 28 hours, and the count was still rising while I watched.
Root cause (from reading the shipped extension code)
- The code is in
extensions/cursor-agent-exec/dist/main.jsand the same logic incursor-agent-host.MarketplaceCacheManager.ensureClonedImplrewrites an https marketplace URL to[email protected]:...and calls a git ref resolver that runsgit ls-remote. - The SSH attempt sets
sshBatchMode, which only avoids prompts and does not limit how long the call can hang. lsRemoteTimeoutMs()returnsundefinedunless thesparsePluginClonesoption is on (30000 ms when it is).- Because the call never fails, the
catchblock that falls back to HTTPS is never reached. - Verified on the same machine:
git ls-remote https://github.com/octoplus-sa/claude-skills.git mainreturned the commit in about 1 second.
Suggested fix
- Always set a timeout on
ls-remote, for example by also passing-o ConnectTimeout=10orServerAliveInterval, and kill the whole process tree when it expires. - Apply the same timeout whether or not
sparsePluginClonesis on. - Kill or reap child processes when the parent exits.
Workaround found: adding this to the remote host’s ~/.ssh/config makes the SSH attempt fail after 10 seconds, so the fallback runs and nothing hangs:
Host github.com
ConnectTimeout 10
Impact: The remote host accumulated about 1,000 stuck processes. Nothing broke, but this wastes process slots and memory and makes the process list hard to use.
Steps to Reproduce
-
Install a plugin whose marketplace repo is hosted on GitHub. Mine is a JSL scripting plugin, and I never added a marketplace by hand. The marketplace is
octoplus-sa/claude-skills. This is a public repo, and HTTPS access to it works. -
Use a network where SSH to github.com hangs. The connection opens but no greeting comes back.
ssh -v [email protected]reports “Connection timed out during banner exchange”. This happens on both port 22 and 443 (ssh.github.com). There was no SSH key on the remote host (.sshheld onlyauthorized_keys). -
Connect with Remote SSH and use the agent normally.
-
After a while, list processes on the remote host. The count of identical stuck commands keeps rising:
git.exe -c credential.interactive=false -c core.fsmonitor=false -c core.longpaths=true ls-remote [email protected]:octoplus-sa/claude-skills.git main ssh.exe -oBatchMode=yes -o SendEnv=GIT_PROTOCOL [email protected] "git-upload-pack 'octoplus-sa/claude-skills.git'"
Expected Behavior
Expected: The ref lookup times out after a reasonable period, kills the child process, and falls back to HTTPS. No processes are left behind.
Actual:
- The call never returns. It waits on
ssh.exeindefinitely, so the HTTPS fallback never runs. - When the launching node process exits, the
gitandsshchildren are left running, with no parent. - Batches appear every few minutes while the agent is in use, usually three at a time.
Operating System
Windows 10/11
Version Information
- Cursor 3.27.14, commit
69b724ebc67ec522c1b5d287a5025f7a7e81be90, built 2026-10-23 - Remote host: Windows 11 (NT 10.0.26300), Git for Windows 2.56.0, OpenSSH_for_Windows_9.5p2
- Connected via Remote SSH. The agent runs on the remote host.
Does this stop you from using Cursor
Sometimes - I can sometimes use Cursor