Where does the bug appear (feature/product)?
Cursor IDE
Describe the Bug
Environment:
Cursor IDE (latest version)
Remote connection via SSH
Linux host
Problem:
Files that were edited by Cursor AI agent get deleted from disk after SSH connection interruption and automatic reconnection/reload.
Steps to reproduce:
Connect to remote PC via SSH in Cursor
Open files and make edits using AI agent (StrReplace tool)
Run a command that causes SSH connection to drop (e.g., launching a program that disrupts networking)
Cursor attempts to reconnect and triggers “reload”
Result: Files that were being edited disappear from:
The filesystem (confirmed via ls and git status showing “deleted”)
Open editor tabs
Expected behavior:
Files should persist on disk. At worst, unsaved changes might be lost, but files themselves should not be deleted.
Actual behavior:
Entire files are deleted from the remote filesystem after reconnection.
Impact:
Critical - data loss. Users lose source code files.
Workaround:
Use git restore to recover deleted files if they were tracked by git.
User theory:
The issue may be related to how Cursor handles file buffers during SSH reconnection - possibly the reload process incorrectly syncs an empty/null state back to the remote filesystem.
Steps to Reproduce
Steps to reproduce:
Connect to remote PC via SSH in Cursor
Open files and make edits using AI agent (StrReplace tool)
Run a command that causes SSH connection to drop (e.g., launching a program that disrupts networking)
Cursor attempts to reconnect and triggers “reload”
Result: Files that were being edited disappear from:
The filesystem (confirmed via ls and git status showing “deleted”)
Open editor tabs
Operating System
Windows 10/11
Version Information
cursor --version
2.5.20
511523af765daeb1fa69500ab0df5b6524424610
x64
Does this stop you from using Cursor
No - Cursor works, but with this issue