CRITICAL BUG: Left Cursor Agent running unattended and it completely wiped Windows System Files (No Operating System Found)

Where does the bug appear (feature/product)?

Cursor IDE

Describe the Bug

I left the Cursor AI Agent running in the background to handle code generation/terminal execution for the cement shop project. While it was running unattended, it executed commands that completely wiped out or corrupted my Windows operating system files.When I checked my PC, it had completely lost its OS installation. Upon rebooting, the motherboard throws a hard “No Operating System on Hard Disk Found” error. The drive is visible in BIOS, but the Windows installation has been entirely destroyed.

Steps to Reproduce

Because I cannot boot into the machine, I cannot access the ~/.cursor logs or the specific conversation history to see the exact terminal tool call or script that caused the loop. However, there is a severe flaw in the agent’s filesystem sandbox/guardrails that allowed it to escape the workspace directory and execute destructive file deletions or directory stashes targeting core Windows system paths while left unattended. Please look into stricter system path blocks and execution guardrails for Windows users when using autonomous agent tasks.

Operating System

Windows 10/11

Version Information

My pc is not starting. I can’t access all that

For AI issues: which model did you use?

Auto

Does this stop you from using Cursor

Yes - Cursor is unusable

Hey @Wilson_Oppong,
Recovery first, and hold off on reinstalling Windows since that overwrites anything still recoverable:

  1. Boot from a Windows USB, then Repair your computer, then Troubleshoot, then Startup Repair. If only boot files were hit, this often brings Windows back.
  2. If that fails, open Command Prompt from that same menu and run dir C:\Users. If your files show up, the data is intact and it’s just the boot config that needs repair, not a full wipe.
  3. If a drive looks empty, stop writing to it and try a recovery tool (Recuva, TestDisk, or PhotoRec) from another PC.

Unless Cursor was launched with Run as administrator, the agent can’t remove core Windows or boot files, so this is worth treating as a boot repair rather than a total loss. Once you’re back in, sharing the chat from that session would let us trace exactly what ran.

Going forward, keep destructive commands behind approval: in Run Modes (Settings, then Agents, then Approvals & Execution) use Auto-review instead of Run Everything, don’t allowlist rmdir/del/Remove-Item, and keep projects in Git or a backup.