# Remote SSH Agent hangs: second extension host spawns with vscode.lock EEXIST despite cursor-agent-exec ready on exthost1

**URL:** <https://forum.cursor.com/t/remote-ssh-agent-hangs-second-extension-host-spawns-with-vscode-lock-eexist-despite-cursor-agent-exec-ready-on-exthost1/171095>\
**Category:** Bug Reports\
**Tags:** extensions, ssh\
**Created:** [September 8, 2026, 9:17pm UTC](https://forum.cursor.com/t/remote-ssh-agent-hangs-second-extension-host-spawns-with-vscode-lock-eexist-despite-cursor-agent-exec-ready-on-exthost1/171095 "2026-09-08T21:17:57Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Alexandros\_Adamos](https://avatars.discourse-cdn.com/v4/letter/a/b77776/32.png) [@Alexandros\_Adamos](https://forum.cursor.com/u/Alexandros_Adamos)\
**Post date:** [September 8, 2026, 9:17pm UTC](https://forum.cursor.com/t/remote-ssh-agent-hangs-second-extension-host-spawns-with-vscode-lock-eexist-despite-cursor-agent-exec-ready-on-exthost1/171095/1 "2026-09-08T21:17:57Z")

</div>

### Where does the bug appear (feature/product)?

Cursor IDE

### Describe the Bug

Agent hangs indefinitely when used in a Remote SSH workspace on Linux. The remote extension host exthost1 successfully activates anysphere.cursor-agent-exec, but when an Agent request is sent, Cursor spawns a second extension host (exthost2) that fails to acquire the workspace lock (EEXIST). Agent never responds.

The same machine worked with Remote SSH Agent approximately one week ago. Current version: Cursor 3.19.13 (commit dd066f332fcea7382764400fde902f61920648d0).

Agent works normally in a local Windows window; the issue is specific to Remote SSH.

Environment  
Component Details  
Client OS  
Windows 10/11  
Client Cursor version  
3.19.13 (commit dd066f332fcea7382764400fde902f61920648d0)  
Remote OS  
Rocky Linux (VirtualBox VM)  
Connection  
Remote-SSH (localhost / SSH config)  
Remote server  
~/.cursor-server/bin/linux-x64/dd066f332fcea7382764400fde902f61920648d0/  
Workspace  
Multi-root .code-workspace on remote

Network: Corporate proxy (Fortinet). curl to [https://api2.cursor.sh](https://api2.cursor.sh) succeeds from both Windows and the VM (direct and via proxy). This is not a connectivity/TLS issue.

VM RAM: Increased from ~618MB available to ~8GB available during troubleshooting. Issue persists.

Log evidence  
exthost1 — agent executor ready (~30s after connect)  
2026-09-08 22:04:18.492 [info] Extension host with pid 97010 started  
2026-09-08 22:04:18.971 [info] ExtensionService#\_doActivateExtension anysphere.cursor-agent-exec, startup: false, activationEvent: ‘\*’  
2026-09-08 22:04:50.174 [info] Extension activated success: anysphere.cursor-agent-exec — 29552ms  
Agent request ~1 hour later — spawns exthost2 with lock conflict  
2026-09-08 23:13:38.352 [info] Extension host with pid 104667 started  
2026-09-08 23:13:38.352 [error] Error: EEXIST: file already exists, open ‘…/workspaceStorage/3bd4de76ba8255419884da936b28a8b6/vscode.lock’  
Only 2 extension hosts in session; exthost2 appears only when Agent is invoked, not at initial connect.

Earlier session — same pattern across multiple hosts  
Host cursor-agent-exec Outcome  
exthost1  
Success at 16:31:53  
Killed by client at 16:32:25  
exthost3  
Started  
Killed at 16:33:05 (~11s, before activation finished)  
exthost4  
Success at 16:34:09  
EEXIST lock conflict  
Windows client — extension host start timeout  
Process participant start failed (id: extension-hosts, ms: 15001) Process start timed out (id: extension-hosts)  
Remote cursor-agent-exec activation often takes 25–30 seconds, which may exceed the client’s 15 second extension-host startup timeout in some scenarios.

What we ruled out  
HTTP proxy / Zscaler cert issues (curl to Cursor APIs works from client and VM)  
Insufficient VM memory (issue persists with 8GB available)  
Multiple Cursor windows / Agent-first UI (issue persists with single IDE window + Connect Current Window)  
Stale ~/.cursor-server install (full wipe + reinstall did not fix)  
Settings tried (no fix)  
“remote.SSH.connectTimeout”: 120,  
“remote.SSH.useExecServer”: false, // also tried true  
“remote.SSH.localServerDownload”: “off”,  
“http.proxy”: “[http://grathad-proxy001.emea.nsn-net.net:8080](http://grathad-proxy001.emea.nsn-net.net:8080)”,  
“http.proxySupport”: “override”,  
“cursor.general.disableHttp2”: true  
Also tried: deleting vscode.lock files, removing workspace storage for the workspace ID, pkill cursor-server, fresh rm -rf ~/.cursor-server.

Hypothesis  
A recent Cursor release (observed on 3.19.13) appears to spawn a separate extension host for Agent requests on Remote SSH, while both hosts contend for the same workspaceStorage/…/vscode.lock. The ready agent executor on exthost1 is ignored. This may be a regression; Remote SSH Agent worked ~1 week ago on the same setup.

### Steps to Reproduce

Open Cursor on Windows in IDE mode (single window).  
Remote-SSH: Connect Current Window to Host → connect to Linux VM.  
Open remote workspace; wait 30+ seconds after connect.  
Send any Agent prompt (e.g. “Reply only with: WORKING”).  
Observed: Agent hangs indefinitely (no response, no clear error in UI).

### Expected Behavior

Agent should use the existing remote extension host (exthost1) where cursor-agent-exec is already activated, and respond normally.

### Operating System

Windows 10/11

### Version Information

Version: Cursor 3.19.13 · commit dd066f332fcea7382764400fde902f61920648d0  
Category: Bug Report · Remote SSH · Agent

### Does this stop you from using Cursor

Yes - Cursor is unusable

---

<div class="post-metadata">

**Author:** ![Colin](https://sea3.discourse-cdn.com/cursor1/user_avatar/forum.cursor.com/colin/32/90452_2.png) [@Colin](https://forum.cursor.com/u/Colin)\
**Post date:** [September 9, 2026, 11:00am UTC](https://forum.cursor.com/t/remote-ssh-agent-hangs-second-extension-host-spawns-with-vscode-lock-eexist-despite-cursor-agent-exec-ready-on-exthost1/171095/5 "2026-09-09T11:00:38Z")

</div>

Hey @Alexandros_Adamos, thanks for the detailed report!

Two clarifications from our side:

- the `vscode.lock EEXIST` line is expected and harmless (the new host simply falls back to a `-1` storage folder)
- the second extension host is not started by the Agent request itself. It appears when Cursor re-establishes the connection to the remote host (or when a second window, such as the Agents Window, connects to the same host) while the previous extension host is still shutting down. The problem is that the replacement host sometimes fails to activate the agent extension.

A workaround that has worked for others in this state:

1. Close every Cursor window except for the IDE session connected to your remote machine.
2. Open the Command Palette (Ctrl+Shift+P) and run "Remote-SSH: Kill Remote Server and Reload Window, pick your VM.
3. Reconnect with a single IDE window
4. Send a test prompt

Also let us know whether the Agents Window was open and connected to the same VM at the time. Thanks!

---

<div class="post-metadata">

**Author:** ![Alexandros\_Adamos](https://avatars.discourse-cdn.com/v4/letter/a/b77776/32.png) [@Alexandros\_Adamos](https://forum.cursor.com/u/Alexandros_Adamos)\
**Post date:** [September 9, 2026, 1:16pm UTC](https://forum.cursor.com/t/remote-ssh-agent-hangs-second-extension-host-spawns-with-vscode-lock-eexist-despite-cursor-agent-exec-ready-on-exthost1/171095/7 "2026-09-09T13:16:00Z")

</div>

Hi Colin,

I did as you instructed, but no luck there ☹ .

“_Also let us know whether the Agents Window was open and connected to the same VM at the time._”

No, Agents Window is closed.

BR,

Alex.

---

<div class="post-metadata">

**Author:** ![Alexandros\_Adamos](https://avatars.discourse-cdn.com/v4/letter/a/b77776/32.png) [@Alexandros\_Adamos](https://forum.cursor.com/u/Alexandros_Adamos)\
**Post date:** [September 10, 2026, 8:52am UTC](https://forum.cursor.com/t/remote-ssh-agent-hangs-second-extension-host-spawns-with-vscode-lock-eexist-despite-cursor-agent-exec-ready-on-exthost1/171095/11 "2026-09-10T08:52:49Z")

</div>

Hi again Colin,

I am sending you also my settings:

_{_

_“update.mode”: “none”,_

_“remote.SSH.connectTimeout”: 120,_

_“remote.SSH.useExecServer”: true,_

_“remote.SSH.remotePlatform”: {_

_“localhost”: “linux”_

_},_

_“cmake.showOptionsMovedNotification”: false,_

_“search.showLineNumbers”: true,_

_“remote.SSH.localServerDownload”: “off”,_

_“editor.renderWhitespace”: “all”,_

_“go.toolsManagement.autoUpdate”: true,_

_“jdk.jdkhome”: “c:\\\< user \>\\JAVA\\Oracle\_JDK-23”,_

_“workbench.startupEditor”: “none”,_

_“terminal.integrated.enableMultiLinePasteWarning”: “auto”,_

_“editor.minimap.enabled”: false,_

_“security.workspace.trust.untrustedFiles”: “open”,_

_“github.copilot.nextEditSuggestions.enabled”: true,_

_“http.proxy”: “http://\< our-proxy:port \>”,_

_“http.proxySupport”: “override”,_

_“http.systemCertificates”: true,_

_“http.experimental.systemCertificatesv2”: true,_

_“cursor.general.disableHttp2”: true,_

_“http.proxyStrictSSL”: false,_

_“codeSight.telemetry.enablement”: false,_

_“[dockercompose]”: {_

_“editor.insertSpaces”: true,_

_“editor.tabSize”: 2,_

_“editor.autoIndent”: “advanced”,_

_“editor.quickSuggestions”: {_

_“other”: true,_

_“comments”: false,_

_“strings”: true_

_},_

_“editor.defaultFormatter”: “redhat.vscode-yaml”_

_},_

_“[github-actions-workflow]”: {_

_“editor.defaultFormatter”: “redhat.vscode-yaml”_

_},_

_“chat.agent.maxRequests”: 40,_

_“security.workspace.trust.enabled”: true,_

_“cursor.composer.usageSummaryDisplay”: “always”,_

_“remote.autoForwardPortsSource”: “hybrid”,_

_“editor.codeActionsOnSave”: {},_

_“editor.formatOnSaveMode”: “modificationsIfAvailable”,_

_“files.refactoring.autoSave”: false,_

_“workbench.colorTheme”: “Cursor Light”,_

_“window.systemColorTheme”: “auto”,_

_“git.openRepositoryInParentFolders”: “never”,_

_“window.autoDetectColorScheme”: true,_

_“cursor.composer.queueMessageDefaultBehavior”: “steer”,_

_“cursor.composer.editorConversationDensity”: “compact-ungrouped”_

_}_

BR,

Alex.

---

<div class="post-metadata">

**Author:** ![Colin](https://sea3.discourse-cdn.com/cursor1/user_avatar/forum.cursor.com/colin/32/90452_2.png) [@Colin](https://forum.cursor.com/u/Colin)\
**Post date:** [September 14, 2026, 1:18pm UTC](https://forum.cursor.com/t/remote-ssh-agent-hangs-second-extension-host-spawns-with-vscode-lock-eexist-despite-cursor-agent-exec-ready-on-exthost1/171095/15 "2026-09-14T13:18:29Z")

</div>

Hey @Alexandros_Adamos, thanks for sending over your settings!

Quick check-in: it looks like you have since moved to Cursor 3.20.17, and from our side your Agent requests in the Remote SSH window have been completing normally since Friday. Are you still seeing the hang on your end?

---

<div class="post-metadata">

**Author:** ![Alexandros\_Adamos](https://avatars.discourse-cdn.com/v4/letter/a/b77776/32.png) [@Alexandros\_Adamos](https://forum.cursor.com/u/Alexandros_Adamos)\
**Post date:** [September 15, 2026, 7:05am UTC](https://forum.cursor.com/t/remote-ssh-agent-hangs-second-extension-host-spawns-with-vscode-lock-eexist-despite-cursor-agent-exec-ready-on-exthost1/171095/16 "2026-09-15T07:05:41Z")

</div>

Hi Colin,

I did a test and upgraded my VM to rocky9-8 and re-installed everything to work there.

That did solve my issue.

But, on that older rocky8 VM with the settings that I handed over, it’s still not working.

Anyway, I will mark the issue as solved because I’m able to work with the new setup.

Take care!

Alex.

---

<div class="post-metadata">

**Author:** ![system](https://sea3.discourse-cdn.com/cursor1/user_avatar/forum.cursor.com/system/32/99069_2.png) [@system](https://forum.cursor.com/u/system)\
**Post date:** [September 17, 2026, 7:05am UTC](https://forum.cursor.com/t/remote-ssh-agent-hangs-second-extension-host-spawns-with-vscode-lock-eexist-despite-cursor-agent-exec-ready-on-exthost1/171095/17 "2026-09-17T07:05:46Z")

</div>

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.
