CRITICAL: Agent deleted entire file without permission and tried to hide it

Where does the bug appear (feature/product)?

Cursor IDE

Describe the Bug

The Cursor Agent misused the file deletion tool to erase my main Python script during a purely conceptual conversation. Furthermore, according to the Agent’s internal “Thought” logs, it explicitly recognized its mistake but deliberately decided to hide the deletion from me. Later, when asked which model it was currently using, the Agent explicitly stated that its underlying model is “GPT-5.1”.

Steps to Reproduce

Open Cursor IDE and ask the AI Agent a purely conceptual/theoretical question. Do not request any file modifications or deletions.

The Agent mistakenly triggers the file deletion tool and deletes the active script.

Open the Agent’s “Thought” dropdown log. You will see it acknowledges the critical mistake (e.g., “Oh no, I shouldn’t have deleted the file! … I should tell the user to restore from a backup instead”).

However, the Agent deliberately chooses not to inform the user about the data loss.

When subsequently asked what model it is currently running on, the Agent replies that it is “GPT-5.1”.

Expected Behavior

Strict Safeguards Against Unauthorized Deletion: Deleting user files without explicit consent is a critical failure that can cause severe data loss and completely disrupt developer workflows. There must be a robust safeguard or mandatory user-confirmation mechanism in place before the Agent is allowed to invoke any file modification or deletion tools, especially during purely conceptual discussions.

Transparent Error Handling, Not Concealment: If a tool misfires and causes unintended data loss, the Agent must immediately halt its process, transparently alert the user, and suggest recovery options (e.g., restoring from local history). Under no circumstances should the Agent’s internal reasoning allow it to actively hide a destructive action from the user.

Screenshots / Screen Recordings

Operating System

Windows 10/11

Version Information

Version: 2.6.19 (user setup)
VSCode Version: 1.105.1
Commit: 224838f96445be37e3db643a163a817c15b36060
Date: 2026-03-12T04:07:27.435Z
Build Type: Stable
Release Track: Default
Electron: 39.4.0
Chromium: 142.0.7444.265
Node.js: 22.22.0
V8: 14.2.231.22-electron.0
OS: Windows_NT x64 10.0.26200

For AI issues: which model did you use?

Agent Auto (When asked, the agent claimed its underlying model is “GPT-5.1”)

Does this stop you from using Cursor

Sometimes - I can sometimes use Cursor

Hey, thanks for the detailed report and the screenshot of the Thought logs.

There are basically three things here:

  1. Deleting a file without confirmation
    This is a known issue. If Auto-Run is set to Run Everything and File-Deletion Protection is turned off, the agent can delete files without asking. Workaround: go to Cursor Settings → Agents and turn on File-Deletion Protection. After that, the agent will ask before every deletion.

  2. “Hiding” the error
    What you see in the Thought logs is the model’s internal reasoning. Cursor shows it transparently, so you were able to read it. But how the model chooses to phrase its reply to the user is behavior of the LLM itself, not Cursor.

  3. The model called itself GPT-5.1
    With Agent Auto, Cursor picks the model automatically. LLMs can answer incorrectly about their own identity, this is known behavior.

For restoring the file: try Ctrl+Z undo in the editor, or check File → Open Recent. Cursor also creates checkpoints, so you can go back to a previous state via Timeline in the sidebar.

The team is aware of the file deletion issue. Your report helps with prioritization. Let me know if you still have questions.