STUPID-2026-0148

Cursor agent approved to delete one 18.5GB temp folder instead ran a mis-quoted rmdir that wiped a developer's source, Git repo, and six months of ERP backups

8.0high
October 3, 2026Verified
  1. Instruction given

    Analyze which underscore-prefixed directories under `E:\ERP .net` were safe to delete to free disk space. The agent recommended clearing only the compilation temporary directory (about 18.5GB) while keeping the backup, source, publish, and Git folders, and the user approved exactly that recommendation.

  2. Expected behavior

    Run a deletion scoped to the single approved temporary directory, and never execute a broader destructive command than the one the user signed off on.

  3. Actual behavior

    The agent issued an `rmdir /s /q` command whose path argument was split by a quoting error, so the command that actually ran targeted far more than the approved temp folder. Because `rmdir /s /q` bypasses the Windows Recycle Bin, everything it touched was deleted with no undo available.

  4. Damage

    The source code, Git repository, publish folder, and file-backup directory under `E:\ERP .net`, plus a separately maintained manual ERP backup archive and logs in the drive's root and a packaging script, were all destroyed. Roughly six months of engineering work and the project's own manual backups were wiped in the same pass; only a compiled binary directory locked by a running process, and unrelated system folders, survived. The reporter later recovered part of the project by decompiling the one surviving compiled build, but the original source and backups were not recoverable.

On October 3, 2026, a developer working in Cursor 3.17.8 on Windows, with Grok 4.7 as the underlying model, asked the agent to analyze which underscore-prefixed directories under `E:\ERP .net` could be safely cleared to free disk space. The agent's analysis recommended deleting only the compilation temporary directory — about 18.5GB — while explicitly keeping the backup, source, publish, and Git folders intact. The developer approved exactly that recommendation. What actually ran was different. The agent issued an `rmdir /s /q` command whose path got split by a quoting error, so the deletion that executed covered far more than the single temp folder that had been approved. `rmdir /s /q` deletes directly, bypassing the Recycle Bin, so there was no undo path once the command completed. The source code, the Git repository, the publish folder, a file-backup directory, a separately maintained manual ERP backup archive, drive-root logs, and a packaging script were all gone. Only a locked, running binary directory and unrelated system folders survived. The developer estimated six months of engineering work and its own backups were destroyed in one pass, and was able to recover only part of the project by decompiling the one compiled build that had escaped deletion — the original source was not recoverable. No Cursor staff response appears on the report thread; other community members suggested recovery avenues (Git remotes, Windows Previous Versions, Local History) and argued that destructive filesystem commands should require a separate, explicit confirmation step distinct from approving the analysis that proposed them.

Classification

Agent
Cursor
Failure mode
Destructive Action
Root cause
Tool Misuse
Domain
Infra

Related incidents

Get told when an agent breaks something

We document AI agent failures daily, severity-scored against a published scale. When one lands at 7.0 or above — deleted data, leaked secrets, broken production — you get an email with the source. When nothing does, you get nothing.

This database is callable over MCP — query it from inside your agent.