Cursor IDE Rouge File Deletion

Where does the bug appear (feature/product)?

Cursor IDE

Describe the Bug

Hi All. First of all, I love Cursor, but I’ve been plagued several times now with now an obviously recurring problem. First I’ll explain my setup and then the symptoms. I don’t have a perfect bug replication procedure but this most recent time, the agent gave me a description that sounds reasonable.

Hardware
Cursor IDE on Mac (two different MacBook Pro Laptops)
I Always connect to remote servers via SSH for development.
This has pretty much always happened when running programs that use GPU on the remote server (ML training).

I often do my work and leave cursor IDE open and connected to the remote servers, and then my laptop often stays on but sometimes closes or becomes disconnected. When I come back I usually have to “Reload Window” and the SSH connection refreshes and I continue working.

So what has now happened 3 or 4 times in the last 2 months, is that when I come back to a project, I try to continue working only to realize that many or all of the main files (usually python files) have been deleted. It seems to be files I was always actively working on, while sparing many other files. Very strange, at first I thought the agent may have done it, even though I am very careful and usually require approval for all tool calls. After debugging quite a bit I’m 99% sure the deletion didn’t originate from agent, but instead from Cursor IDE itself.

It just happened again. I was connected to google cloud GPU-enabled instance via SSH from my MacBook laptop, I was doing some GPU work, long-running process so I just let it go, leaving cursor IDE open.

When I check in the next day I find that all the main files I was working on are gone. Here, the agent gave the following diagnosis:
"
OK, here’s what happened. Git shows 10 files are deleted from the working tree:
deleted: .gitignore
deleted: ***licy.py
deleted: ***ictor.py
deleted: ***ils.py
deleted: ***ictor.py
deleted: requirements.txt
deleted: scripts/eval_ev.py
deleted: scripts/train_15min.py
deleted: ***ns_policy.py
deleted: ***_policy.py
These are all the files we created/modified during our sessions. They were committed to git and pushed to the remote successfully, but the actual files on the local filesystem are gone. This looks like the workspace sandbox overlay that was holding our edits got cleared – the files lived in a transient layer that evaporated, but git preserved them in the commits.
The good news: nothing is lost. All the code is safely in the git history and on the remote. The commits (732ee33 and c9b21fd) contain everything. We just need to restore the deleted files from git with git restore. There’s nothing to overwrite since the files are simply missing. Want me to go ahead and restore them?

"

Luckily this time I had everything committed, but this behaviour is scary and now has happened so many times I’m sure it isn’t something I keep doing. It seems like a bug in the way Cursor handles files, perhaps having to with SSH remote sources and perhaps (somehow) having to with GPU training on those remote machines.

I appreciate any help here.

Steps to Reproduce

This bug is Intermittent, I wouldn’t say I have pinned down exactly how to reproduce.

Expected Behavior

Files don’t get deleted.

Operating System

MacOS

Version Information

Version: 2.5.20 (Universal)
VSCode Version: 1.105.1
Commit: 511523af765daeb1fa69500ab0df5b6524424610
Date: 2026-02-19T20:41:31.942Z (2 wks ago)
Build Type: Stable
Release Track: Default
Electron: 39.4.0
Chromium: 142.0.7444.265
Node.js: 22.22.0
V8: 14.2.231.22-electron.0
OS: Darwin arm64 24.6.0

Does this stop you from using Cursor

Sometimes - I can sometimes use Cursor

Hey, thanks for the detailed report. This is a serious issue. We’re seeing similar reports from other users with the same pattern (macOS + SSH remote + laptop sleep or disconnect = files deleted from disk). Here’s a related thread: Critical bug - Cursor SSH Remote physically deletes workspace files on disconnect/reconnect.

The team is aware of the problem. To help us prioritize and debug it, we’d like to collect some diagnostics. Next time this happens, before running git restore, if possible:

  1. Copy the SSH logs: View > Output > select “Anysphere Remote SSH” in the dropdown
  2. Run ls -la in the directories where the files disappeared (to confirm they’re actually deleted and not a permissions issue)
  3. Run ps aux | grep cursor on the remote server to see which Cursor processes were active
  4. Check if the files are in the remote trash (~/.local/share/Trash or similar)

A couple questions too:

  • Which SSH extension are you using? Anysphere Remote SSH or the standard VS Code Remote-SSH? If you’re using the VS Code one, please switch to Anysphere.
  • Extension list: cursor --list-extensions would be helpful so we can see if there are any conflicting extensions.

As a temporary workaround, besides frequent commits, you can set up a crontab or systemd job on the remote to run git stash or back up the workspace every N minutes. Not ideal, but it can help prevent data loss until this is fixed.

Let me know if you’re able to grab the logs.

1 Like

I saw this few days ago and was strange because:

  • for nor reason in chat he was telling me is deleting files and were marked with red as Deleted.
  • in my project files were safe and still intact.
1 Like

Well, thanks for responding here. It is already a relief to know that it is becoming a known issue. For now I can tell you I had already checked the linux trash locations after deletion, the files are never there (they usually aren’t there if you use rm).

I use the native VS Code Remote-SSH. Has switching to Anyshpere shown that is solves this problem?

Locally on my laptop, I don’t even have the cursor CLI installed, remotely the command shows there are no extensions installed.

Dang this is crazy, happened again. I don’t think I can even user cursor like this, this is terrible. It is just hard to believe that random rogue file deletion is a known issue and has not been fixed yet. This is a pretty low bar requirement for any computer system, let along a dedicated code editor: don’t delete things randomly.

Hey, I can see the issue happened again. That’s really not acceptable, and I get how frustrating this is. Deleting files is a critical bug, and we’re not taking it lightly.

Status update: the team is aware, and a few users have hit the same pattern SSH remote + disconnect/reconnect = files deleted.

On your request, switching to Anysphere Remote SSH unfortunately doesn’t guarantee a fix. Another user with the same bug switched and it still happened again: Critical bug — Cursor SSH Remote physically deletes workspace files on disconnect/reconnect (3rd occurrence). That said, VS Code Remote-SSH isn’t officially supported, so it’s still worth switching at least for compatibility.

Workarounds for now:

  • Frequent commits, you’re already doing this and that’s the right move
  • On the remote server, set up a crontab that backs up the workspace folder every N minutes or runs git stash
  • If you can, try not to leave Cursor open when you step away from your laptop. Close the SSH session before the laptop goes to sleep

One more ask. If it happens again, before you run git restore, please try to save the SSH logs: View > Output > pick Remote SSH or Anysphere Remote SSH in the dropdown. Those logs will really help engineering find the exact moment the deletion happens.

Let me know if you need anything else.

This is terrible. I encountered the same issue. The workspace overlay seems to have a bug. It deletes many of my files when the network is not stable, and I have to re-log in to the cursor.

@deanrie Do you have an ETA for when this will be fixed? Cursor is effectively unusable right now, and the issue feels risky enough that I can’t rely on Cursor until it’s resolved.

Just coming here to say I’ve updated the software, it is still happening. I am finished with Cursor. I am moving on. Yay! Back on VS Code now and it works surprisingly well and similar to cursor. Don’t think I’ll be coming back soon.

Unfortunately, there’s no specific ETA yet. The team is aware of the issue, and reports like yours help us prioritize it. For now, the best workaround is to commit often and close your SSH session before stepping away from your laptop. Don’t leave Cursor open while the laptop is asleep.

We’ll post updates as the situation evolves.

It’s frustrating that the bug is still reproducible. I get that it makes it hard to work normally, losing files is critical.

The team is aware of this issue. A few users have run into the same pattern SSH remote plus disconnect and reconnect leads to files getting deleted.

If you decide to try Cursor again later, let me know and we’ll check the fix status.

1 Like

Well the support on this forum has been top notch, however, so that was nice.