Remote SSH agent terminal broken on Ubuntu 22.04 GCP host: PTY not found / remoteTerminalBackend already registered

Where does the bug appear (feature/product)?

Cursor IDE

Describe the Bug

Cursor Agent terminal is unusable on one Remote-SSH host. Commands appear to run but return no output, and in some cases do not execute at all. Normal SSH works fine. The same local Cursor install works against WSL2 Ubuntu 20.04, but fails against this GCP Ubuntu 22.04 VM.

Environment

Cursor version: 2.6.18

Local OS: macOS

Remote connection: Remote SSH

Remote host: Ubuntu 22.04 on GCP

Kernel: 6.8.0-1048-gcp #51~22.04.1-Ubuntu SMP Wed Feb 11 02:58:49 UTC 2026 x86_64

SSH user: newgoloka

What happens

Agent terminal commands return no output

Sometimes the agent claims a command ran, but the command has no side effect

Normal SSH terminal on the same host works correctly

Cursor editing/file browsing works, but Agent terminal execution is broken

On WSL2 Ubuntu 20.04, agent terminal works

Steps to Reproduce

Connect to the Ubuntu 22.04 GCP VM with Cursor Remote SSH

Open a folder on the remote host

Ask Agent to run simple commands like:

pwd
echo hello
touch /tmp/cursor_test
ls -l /tmp/cursor_test

Observe that output is empty and/or the command does not actually run

Expected Behavior

Agent terminal should open and execute remote commands normally, returning stdout/stderr and causing real side effects.

Operating System

Linux

Version Information

Version: 2.6.18
VSCode Version: 1.105.1
Commit: 68fbec5aed9da587d1c6a64172792f505bafa250
Date: 2026-03-10T02:01:17.430Z
Build Type: Stable
Release Track: Default
Electron: 39.6.0
Chromium: 142.0.7444.265
Node.js: 22.22.0
V8: 14.2.231.22-electron.0
OS: Darwin arm64 25.3.0

Additional Information

Important controls / things already ruled out

Manual SSH works normally

Manual commands like time ls /home/newgoloka/services return instantly

Permissions are fine

.profile and .bashrc are standard and non-interactive shells return early

Reinstalling ~/.cursor-server did not fix it

Changing project directory did not fix it

Rolling back several Remote-SSH extension versions did not help

Ubuntu user namespace settings are OK:

kernel.apparmor_restrict_unprivileged_userns = 0

kernel.unprivileged_userns_clone = 1

Most relevant DevTools errors
These seem to be the load-bearing errors:

ERR Unable to create workbench contribution ‘remoteTerminalBackend’. Error: A terminal backend with remote authority ‘ssh-remote+newgoloka.com’ was already registered.
ERR Could not find pty 10 on pty host
ERR Could not find pty 11 on pty host
ERR Could not find pty 12 on pty host
ERR Could not find pty 13 on pty host
[composer] Extension host became UNRESPONSIVE

There is also:

ERR [LocalProcess1][resolveAuthority(ssh-remote,1)][835ms] returned an error Object

Comparison that may help narrow it down

Same Cursor client works on WSL2 Ubuntu 20.04

Fails on this Ubuntu 22.04 GCP VM

This suggests an environment-sensitive Remote-SSH / PTY backend issue rather than a general Cursor install issue

Workaround
Use Cursor only for editing, and run commands in a normal SSH terminal. Agent terminal is not usable on this host

Does this stop you from using Cursor

No - Cursor works, but with this issue

Hey, thanks for the thorough report. The DevTools errors are really helpful.

The remoteTerminalBackend already registered error is a known type of SSH terminal issue we’re tracking. It looks like the terminal backend gets registered twice during SSH connect or reconnect. That can then lead to the PTY errors and the extension host becoming unresponsive like you’re seeing.

A couple of things to try:

  1. Enable Legacy Terminal Tool: Cursor Settings CMD + Shift + J > Agents > Inline Editing & Terminal > turn on Legacy Terminal Tool. Then CMD + Shift + P > Terminal: Kill All Terminals and fully restart Cursor.

  2. Reset the remote cursor-server and reconnect fresh: On the GCP VM, run rm -rf ~/.cursor-server. Then in Cursor, close the remote window completely (not just disconnect), quit Cursor, reopen it, and reconnect. I know you tried this already, but the key is making sure there are no stale cursor-server processes running on the remote. Check with ps aux | grep cursor before reconnecting.

  3. Set an explicit remote terminal profile: In Cursor Settings, search for terminal.integrated.defaultProfile.linux, and in the Remote [SSH: newgoloka] scope, explicitly set it to bash.

If none of that helps, I’ll need a Request ID from a stuck agent command (top-right of the chat > Copy Request ID) so we can dig deeper on our side.

The team is aware of this type of SSH terminal issue. Your report with the specific error trace helps us prioritize it. Let me know how it goes.

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