Cursor wiped most of the application code

Where does the bug appear (feature/product)?

Cursor IDE

Describe the Bug

New application was created with Cursor from PRD documents. No major issues in the application layout, most of the requested features implemented correctly. After few hours of adding missing pages and fixing broken buttons, request to add a missing page wiped somewhere around 70% of the application code. No visual effects, log entries or obvious reason for that.
Cursor did not had permission to delete files in the app folder.

Steps to Reproduce

Nothing meaningful as to repro steps, it just happened without log entries about deleting files.

Operating System

MacOS

Current Cursor Version (Menu → About Cursor → Copy)

Version: 1.4.5 (Universal)
VSCode Version: 1.99.3
Commit: af58d92614edb1f72bdd756615d131bf8dfa5290
Date: 2025-08-13T02:08:56.371Z (4 days ago)
Electron: 34.5.8
Chromium: 132.0.6834.210
Node.js: 20.19.1
V8: 13.2.152.41-electron.0
OS: Darwin arm64 24.6.0

Does this stop you from using Cursor

No - Cursor works, but with this issue

hi @AndreyVasilevsky and thank you for the bug report.

Could you provide more details as it is not clear which part of Cursor may have caused this:

  • Was it in Chat / Agent or somewhere else?
  • Was it during an app update or not related to update?
  • Which model did you use during the issue?
  • Did you enable Auto-run mode in Cursor settings?

Cursor was in agent mode, set to auto-selection of the model.
No updates happened to Cursor during work.
This was a first chat in a new project and context window showed about 75% when it happened.
Auto-run was enabled or the “allowed” commands list and “rm” was not there. Here is the allowed list:

There was no reason to run any of the npm commands, app was already working and agent was adding a missing page. It probably executed mkdir to create a directory in the app/dashboard/ but missing files were all over. All configuration files from the root of the application were missing. Npm run dev complained that “dev” is not found…

Thank you for the additional details. To help diagnose what happened, more details may be necessary:

  • Did you regularly use Git to commit and push your code? Sometimes having recent commits can help recover lost work.
  • Are there any OS-level backups (like Time Machine) or backup solutions for your project directory?
  • Have you noticed any system alerts or file opening issues? On macOS, there can be issues with file access, sometimes caused by permission locks or system hibernation. A restart can help, but system logs might show warnings.
  • Are you running any antivirus or security software? Occasionally, such programs can block or quarantine files unexpectedly. Any logs or warnings?
  • If you still have the Cursor chat transcript for that session, could you share it? It might reveal which operations were executed (especially relevant commands during agent auto-mode).

From what you described, this shouldn’t have happened, and your allowed command list shouldn’t have let the agent remove so much. I’d like to help identify if this was a bug with Cursor’s agent, a permissions issue, or possibly a system/external factor.

Let me know about the above, and I’ll help you investigate further.