Cursor AI agent deleted all my work files

Where does the bug appear (feature/product)?

Cursor IDE

Describe the Bug

I gave an instruction to delete a project in the workspace folder. The agent decided to delete all my data and years of work. This is unacceptable. I’m using data recovery tools. This is a very serious failure. How can you justify this behavior?

Steps to Reproduce

Create an API project, it wasn’t correct and didn’t meet expectations.
I requested to delete that project. An error happened when trying to delete the folders. It started another terminal and deleted all my work files.

Expected Behavior

If there’s an error, ask what action to take.

Operating System

Windows 10/11

Version Information

Version: 3.8.11 (system setup)
VS Code Extension API: 1.105.1
Commit: e56ad3440df06d22ca7501e65fd518e905486ef0
Date: 2026-06-18T01:40:18.333Z (1 wk ago)
Layout: editor
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: Windows_NT x64 10.0.26200

For AI issues: which model did you use?

Auto

Does this stop you from using Cursor

Yes, Cursor is unusable

Hi,

Thanks for posting on the Cursor forum!

To keep discussions accessible to as many users as possible, this forum is currently English only. If you’d like, you can edit your post to translate it into English, and once it meets our guidelines it will be automatically relisted.

Thanks for understanding!

Note: This is an automated detection system and sometimes makes mistakes. If your post is already in English, feel free to ignore this message, or just make a small edit and it will be reviewed again.

Hey Jose. I’m really sorry, losing work you’ve built up is always painful, especially when it’s years of work.

The most urgent thing right now is recovery. Since the data is gone from the disk, it’s important to stop writing anything to that disk as soon as possible. Don’t save files there, and don’t install programs there. Deleting with rmdir /s /q marks the space as free, but the data often still physically exists for a while. As long as it hasn’t been overwritten by new data, there’s still a chance to restore it. The less activity on that disk, the better the odds. I see you already started recovery tools, that’s the right call. The sooner, the better.

About what happened: on Windows, an agent can sometimes switch from one command to another when deleting folders, and because PowerShell and cmd.exe handle quotes and escaping differently, a path can collapse to the drive root. Then a recursive delete goes much wider than intended. This is known behavior and it does happen. Models are being trained to be more careful with destructive actions, but for now it’s best to add safety via settings.

To prevent this from happening again, check Settings → Agents → Run Mode. Since version 3.6+ the modes are:

  • Allowlist: the strictest. Only allowlisted commands run automatically. Everything else, including deletes, needs manual confirmation. I’d switch to this.
  • Auto-review: the default mode you probably had. It uses an LLM classifier, but destructive commands can still slip through.
  • Run Everything: runs anything without checks. Don’t use this.

Also, you can add dangerous commands like rmdir /s /q, rd /s /q, del /s /q, rm -rf, Remove-Item -Recurse -Force to a deny-list via permissions.json so they never run automatically. More details: Run Modes | Cursor Docs

And for the future, regular backups plus version control are the best protection against this.

Let me know how the recovery goes.

Recupere 90% de los datos, ahora tengo q hacer mi trabajo de vuelta. Este fue un error muy grave, ejecuto una instrucción no requerida cometió un error que me trajo un déficit en mi trabajo. En teoría esta para ayudarme, no traerme problemas.