Remote images fail to load in Agent pane over SSH (`vscode-remote-resource://undefined:undefined`)

Where does the bug appear (feature/product)?

Cursor IDE

Describe the Bug

Remote images fail to load in the Agent pane over SSH

When using Cursor through Remote SSH, image files can be opened normally in the IDE’s built-in file preview, but the same images cannot be displayed in the Agent pane.

The failed image request uses a URL similar to:

vscode-remote-resource://undefined:undefined/stable-<commit>/vscode-remote-resource?path=%2Fremote%2Fproject%2Fimage.png&glassMediaVersion=1

The suspicious part is:

vscode-remote-resource://undefined:undefined/

It appears that the Agent pane fails to obtain the host and port of the Remote SSH resource proxy when generating the image URL.

Actual behavior

  • The image opens correctly in the IDE file preview.
  • Other remote files can be accessed normally.
  • The Agent pane cannot display any remote image.
  • The generated remote-resource URL contains undefined:undefined.

Additional observations

This appears to affect only the Agent pane’s remote-resource loading path. The Remote SSH filesystem connection itself is working correctly, and the image file exists and is readable.

Reloading the window or reopening the image does not reliably resolve the issue.

Environment

  • Cursor running through Remote SSH
  • Cursor stable build
  • Remote image preview works in the IDE
  • Remote image preview fails in the Agent pane

Steps to Reproduce

When using Cursor through Remote SSH, image files can be opened normally in the IDE’s built-in file preview, but the same images cannot be displayed in the Agent pane.

Expected Behavior

The Agent pane should display image files from the current Remote SSH workspace, just as the IDE file preview does.

Screenshots / Screen Recordings

Operating System

MacOS

Version Information

Version: 3.12.17
VS Code Extension API: 1.128.0
Commit: 0fb762053c34788bb7760d5673f8a6d4c8589d50
Date: 2026-07-17T02:53:53.006Z
Layout: Agent Window
Build Type: Stable
Release Track: Default
Electron: 40.10.3
Chromium: 144.0.7559.236
Node.js: 24.15.0
V8: 14.4.258.32-electron.0
xterm.js: 6.1.0-beta.256
OS: Darwin arm64 25.4.0

Does this stop you from using Cursor

No - Cursor works, but with this issue

Hey, thanks for the detailed report. The DevTools screenshot and the undefined:undefined URL are super helpful, and the symptom is clear.

Confirmed, this is a bug on our side. It only affects the image loading path in the Agent pane when using Remote SSH. The Agent pane doesn’t get the host and port for the remote resource proxy, so it generates a broken URL. The classic IDE preview uses a different path, so it works there. I’ve filed an internal report. I can’t share an ETA for a fix yet.

Workaround for now, open the image in the normal editor (Editor Window). Preview works there, like you noticed. There isn’t a workaround inside the Agent pane yet.

I’ll post an update in the thread once there’s progress on the fix.