Agent chat created in Remote-SSH reopens on local %TEMP% workspace with no reconnect prompt

Where does the bug appear (feature/product)?

Cursor IDE

Describe the Bug

When an Agent chat is originally created inside a Remote-SSH workspace, reopening that same chat later (after the remote window/session is gone, or after a long time) no longer attaches to the original remote workspace. Instead the conversation is rebound to a local temporary workspace under %TEMP% (e.g. C:\Users<user>\AppData\Local\Temp<uuid>), mapped as a Cursor project like C-Users-…-AppData-Local-Temp-…

There is no clear warning that the Remote-SSH root is gone, and no prompt to reconnect to the original ssh-remote+host/path. Users reasonably expect chat history to stay bound to the remote workspace, so this feels like the conversation was silently “migrated” to local.

Agent tools such as move_agent_to_root only accept local absolute paths and cannot re-attach the existing conversation to vscode-remote://ssh-remote+… URIs. The only workaround is opening a new Remote-SSH window and starting a brand-new Agent chat, losing continuity of the original thread as a remote workspace session.

Steps to Reproduce

  1. Connect via Remote-SSH and open a remote folder.
  2. Start an Agent chat in that remote window and do some work.
  3. Close the remote window / disconnect SSH / restart Cursor (or reopen the chat days/months later from chat history / Agents Window).
  4. Reopen the same historical Agent conversation.
  5. Observe that the chat is now attached to a local %TEMP% workspace instead of the original Remote-SSH root, with no reconnect prompt.

Expected Behavior

Either rebind the conversation to the original Remote-SSH workspace (prompt to reconnect to ssh-remote+host/path), OR clearly show that the remote workspace is unavailable and offer “Reconnect to remote workspace” / “Continue locally” choices. Ideally allow continuing the same chat thread once the remote host is reconnected.

Operating System

Windows 10/11

Version Information

Version: 3.24.18
OS: Windows 10 (10.0.19045)

For AI issues: which model did you use?

Composer / Agent chat (Remote-SSH + Agents Window)

Additional Information

This is a high-friction UX gap for Remote-SSH + Agent workflows: chat transcript persists, but remote workspace affinity does not.

Please prioritize:

  1. Preserve/reconnect remote workspace binding for historical Agent chats
  2. If rebinding is impossible, show an explicit reconnect UI instead of silently falling back to %TEMP%

Observed local fallback path example: C:\Users\siqi\AppData\Local\Temp\a28ee1e2-ac0f-4cba-8f8d-5c1749e378dc mapped as Cursor project C-Users-siqi-AppData-Local-Temp-…

Does this stop you from using Cursor

No - Cursor works, but with this issue

Hi @odduk, this is what happens when a chat is started in a Remote-SSH window that has no folder open (connected to the host, but no folder picked). A chat like that isn’t saved with the host, so when you open it later it comes back as a no-folder chat on your PC, and the agent in it runs on your PC rather than on the host. The %TEMP%<uuid> path is the placeholder project a no-folder window gets.

To keep chats tied to the remote, open a folder on the host first (File > Open Folder in the Remote-SSH window) and start the chat there. Those are saved with the host and folder, and should connect back to it when you reopen them.

You’re right that there’s no way to re-attach the existing chat to the host today, and nothing on screen tells you it happened. I’ve passed both to the team.

If that chat was started with a remote folder open, which folder was it?