Cursor Chat Agent Delete Whole Disk File!

Where does the bug appear (feature/product)?

Cursor IDE

Describe the Bug

10 minutes ago, when I use cursor chat work with my business,
and let it merge business logic and drop a useless folder it created, after 3 minutes later,
there I found my whole work disk has been cleared whole, all file in the disk that were not in running and accessable were deleted, even windows recycle bin…

I can’t recover those work file from recycle bin, and now have to use some disk tools to do recover them. I found some executable files were mistaken and couldn’t run…

I’ll lose many files forever!

here is what it run:
cmd /c “rmdir /s /q "f:\Work Lib\Yuch Air\Checker\mapping\common"”

cmd /c “rmdir /s /q "f:\Work Lib\Yuch Air\Checker\mapping\common"”
$RECYCLE.BIN\S-1-5-18 - Access is denied.
$RECYCLE.BIN\S-1-5-~1 - Access is denied.
$RECYCLE.BIN\S-1-5-~3 - Access is denied.
$RECYCLE.BIN\S-1-5-~2 - Access is denied.
$RECYCLE.BIN - Access is denied.
\PYTHON~2\Rain\NODE_M~1\CACHE~1 - The directory is not empty.
\PYTHON~2\Rain\NODE_M~1@esbuild\WIN32-~2\esbuild.exe - Access is denied.
\PYTHON~2\Rain\NODE_M~1@OXC-P~1\BINDIN~1\parser.win32-x64-msvc.node - Access is denied.
\PYTHON~2\Rain\NODE_M~1@OXC-T~1\BINDIN~1\transform.win32-x64-msvc.node - Access is denied.
\PYTHON~2\Rain\NODE_M~1@ROLLD~1\BINDIN~1\rolldown-binding.win32-x64-msvc.node - Access is denied.
\PYTHON~2\Rain\NODE_M~1@rollup\ROLLUP~4\rollup.win32-x64-msvc.node - Access is denied.
\PYTHON~2\Rain\NODE_M~1@TAILW~1\OXIDE-~1\tailwindcss-oxide.win32-x64-msvc.node - Access is denied.
\PYTHON~2\Rain\NODE_M~1\LIGHTN~1\lightningcss.win32-x64-msvc.node - Access is denied.
\PYTHON~2\Rain - The process cannot access the file because it is being used by another process.
\PYTHON~2\RainB\GIT~1\cursor\crepe\B15E57~1\index.bin - Access is denied.
\PYTHON~2\RainB - The process cannot access the file because it is being used by another process.
\SYSTEM~1 - Access is denied.
\VIRTUA~1\WIN10~1\mksSandbox.log - The process cannot access the file because it is being used by another process.
\VIRTUA~1\WIN10~1\vmware.log - The process cannot access the file because it is being used by another process.
\VIRTUA~1\WIN10~1\W10-s001.vmdk - The process cannot access the file because it is being used by another process.
\VIRTUA~1\WIN10~1\W10-s002.vmdk - The process cannot access the file because it is being used by another process.
\VIRTUA~1\WIN10~1\W10-s003.vmdk - The process cannot access the file because it is being used by another process.
\VIRTUA~1\WIN10~1\W10-s004.vmdk - The process cannot access the file because it is being used by another process.
\VIRTUA~1\WIN10~1\W10-s005.vmdk - The process cannot access the file because it is being used by another process.
\VIRTUA~1\WIN10~1\W10-s006.vmdk - The process cannot access the file because it is being used by another process.
\VIRTUA~1\WIN10~1\W10-s007.vmdk - The process cannot access the file because it is being used by another process.
\VIRTUA~1\WIN10~1\W10-s008.vmdk - The process cannot access the file because it is being used by another process.
\VIRTUA~1\WIN10~1\W10-s009.vmdk - The process cannot access the file because it is being used by another process.
\VIRTUA~1\WIN10~1\W10-s010.vmdk - The process cannot access the file because it is being used by another process.
\VIRTUA~1\WIN10~1\W10-s011.vmdk - The process cannot access the file because it is being used by another process.
\VIRTUA~1\WIN10~1\W10-s012.vmdk - The process cannot access the file because it is being used by another process.
\VIRTUA~1\WIN10~1\W10-s013.vmdk - The process cannot access the file because it is being used by another process.
\VIRTUA~1\WIN10~1\W10-s014.vmdk - The process cannot access the file because it is being used by another process.
\VIRTUA~1\WIN10~1\W10-s015.vmdk - The process cannot access the file because it is being used by another process.
\VIRTUA~1\WIN10~1\W10-s016.vmdk - The process cannot access the file because it is being used by another process.
\VIRTUA~1\WIN10~1\W10-s017.vmdk - The process cannot access the file because it is being used by another process.
\VIRTUA~1\WIN10~1\W10-s018.vmdk - The process cannot access the file because it is being used by another process.
\VIRTUA~1\WIN10~1\W10-s019.vmdk - The process cannot access the file because it is being used by another process.
\VIRTUA~1\WIN10~1\W10-s020.vmdk - The process cannot access the file because it is being used by another process.
\VIRTUA~1\WIN10~1\W10-s021.vmdk - The process cannot access the file because it is being used by another process.
\VIRTUA~1\WIN10~1\W10-s022.vmdk - The process cannot access the file because it is being used by another process.
\VIRTUA~1\WIN10~1\W10-s023.vmdk - The process cannot access the file because it is being used by another process.
\VIRTUA~1\WIN10~1\W10-s024.vmdk - The process cannot access the file because it is being used by another process.
\VIRTUA~1\WIN10~1\W10-s025.vmdk - The process cannot access the file because it is being used by another process.
\VIRTUA~1\WIN10~1\W10-s026.vmdk - The process cannot access the file because it is being used by another process.
\VIRTUA~1\WIN10~1\W10-s027.vmdk - The process cannot access the file because it is being used by another process.
\VIRTUA~1\WIN10~1\W10-s028.vmdk - The process cannot access the file because it is being used by another process.
\VIRTUA~1\WIN10~1\W10-s029.vmdk - The process cannot access the file because it is being used by another process.
\VIRTUA~1\WIN10~1\W10-s030.vmdk - The process cannot access the file because it is being used by another process.
\VIRTUA~1\WIN10~1\W10-s031.vmdk - The process cannot access the file because it is being used by another process.
\VIRTUA~1\WIN10~1\W10-s032.vmdk - The process cannot access the file because it is being used by another process.
\VIRTUA~1\WIN10~1\W10-s033.vmdk - The process cannot access the file because it is being used by another process.
\VIRTUA~1\WIN10~1\W10-s034.vmdk - The process cannot access the file because it is being used by another process.
\VIRTUA~1\WIN10~1\W10-s035.vmdk - The process cannot access the file because it is being used by another process.
\VIRTUA~1\WIN10~1\W10-s036.vmdk - The process cannot access the file because it is being used by another process.
\VIRTUA~1\WIN10~1\W10-s037.vmdk - The process cannot access the file because it is being used by another process.
\VIRTUA~1\WIN10~1\W10-s038.vmdk - The process cannot access the file because it is being used by another process.
\VIRTUA~1\WIN10~1\W10-s039.vmdk - The process cannot access the file because it is being used by another process.
\VIRTUA~1\WIN10~1\W10-s040.vmdk - The process cannot access the file because it is being used by another process.
\VIRTUA~1\WIN10~1\W10-s041.vmdk - The process cannot access the file because it is being used by another process.
\VIRTUA~1\WIN10~1\W10-s042.vmdk - The process cannot access the file because it is being used by another process.
\VIRTUA~1\WIN10~1\W10-s043.vmdk - The process cannot access the file because it is being used by another process.
\VIRTUA~1\WIN10~1\W10-s044.vmdk - The process cannot access the file because it is being used by another process.
\VIRTUA~1\WIN10~1\W10-s045.vmdk - The process cannot access the file because it is being used by another process.
\VIRTUA~1\WIN10~1\Win 10-1d5a7d5b.vmem - Access is denied.
\VIRTUA~1\WIN10~1\Windows 10 x64.nvram - The process cannot access the file because it is being used by another process.
\VIRTUA~1\WIN10~1\Windows 10 x64.scoreboard - The process cannot access the file because it is being used by another process.
\VIRTUA~1\WIN10~1 - The process cannot access the file because it is being used by another process.
\WORKLI~1\YUCHAI~1\Checker\app\lib - The process cannot access the file because it is being used by another process.
\WORKLI~1\YUCHAI~1\Checker\mapping\DY - The process cannot access the file because it is being used by another process.
\WORKLI~1\YUCHAI~1\Checker - The process cannot access the file because it is being used by another process.
\WORKLI~1\YUCHAI~1\NHSERV~1\GIT~1\cursor\crepe\B99F08~1\index.bin - Access is denied.
\WORKLI~1\YUCHAI~1\NHSERV~1 - The process cannot access the file because it is being used by another process.
The system cannot find the file specified.
The system cannot find the path specified.
The system cannot find the path specified.

Steps to Reproduce

Don’t wanna this again

Screenshots / Screen Recordings

Operating System

Windows 10/11

Version Information

Version: 3.20.17 (user setup)
VS Code Extension API: 1.128.0
Commit: 0c32194e3fb5ffaced9fb36430b860ec301e1fc0
Date: 2026-09-12T03:16:10.634Z
Layout: IDE
Build Type: Stable
Release Track: Default
Electron: 42.10.0
Chromium: 148.0.7778.280
Node.js: 24.18.1
V8: 14.8.178.38-electron.0
xterm.js: 6.1.0-beta.291
OS: Windows_NT x64 10.0.19044

request id: 2a50b467-0c71-4155-baf7-6aad97f9593e

Does this stop you from using Cursor

Sometimes - I can sometimes use Cursor

Hey @Rain_17, sorry you’re dealing with this. First priority is recovery:

  • Stop writing anything to F: right now (no installs, downloads, or saves). Deleted data stays on disk until something overwrites it, so every write lowers what a recovery tool can bring back. Run your recovery tool from another drive and restore to another drive.
  • The files that showed “being used by another process” were locked at the time and weren’t deleted, so those survived.
  • rmdir /s /q deletes without going through the Recycle Bin, which is why nothing landed there. On an SSD, TRIM can limit results, so a dedicated recovery tool is your best shot.

What happened: the agent generated a Windows delete command whose quotes collapsed under PowerShell, so rmdir /s /q resolved to the root of F: instead of the mapping\common folder. Because approvals were set to run commands automatically, it executed without stopping for a confirmation.

The lever for this is the run mode: open Settings → Agents → Approvals & Execution and set it to Allowlist, leaving the allowlist empty, so every terminal command waits for your approval before it runs. On Windows these commands don’t run in a sandbox, so approving them yourself is the strongest safeguard. Keeping the agent’s working folder on a drive that only holds that project, with backups elsewhere, also limits what any single command can reach.

Thanks for ur reply and suggestion, I know if cover those deleted data, will cause real irreparable lose, I had tried recovered lost files, but finally, with empty or broken content in them.
So the result is, lost whole disk data all…

I use default configure for cursor, and just migrated from vscode, but with this terrible happened,
I MUST WARN THAT: cursor team should default open “File Deletion Protection” option for all user.

After all, A new clean disk & new beginning, :face_without_mouth: :neutral_face: