Cursor AI Deleted My Files and Checkpoint Didn't Restore Them: What to Do Next
Recover project files deleted by a Cursor AI Agent by first checking Git history or backups, because the local Restore Checkpoint feature cannot reverse modifications made via terminal commands, subagents, or manual edits.
● For files already tracked in Git, retrieve the missing working-tree file from the index or a specific commit using the command git restore --source=HEAD -- path/to/file.
● If the file was never committed, immediately halt all write activities on the source drive to prevent permanent overwriting caused by normal operating system usage or SSD TRIM processes.
● Scan the storage media using Recoverit File Recovery installed on a separate, healthy drive, and verify nameless recovered files using the scan result path, size, and category previews.
Ask AI for a summary
In this r/cursor file-loss case, the user says Agent deleted project files and Restore Checkpoint still left them missing. That does not prove the files are permanently gone. Cursor says checkpoints are local snapshots of Agent file changes and are separate from Git, while Agent can also run terminal commands. A recent Cursor support reply explains that changes made through terminal commands, subagents, or manual edits may remain outside a checkpoint restore.
Check Git Before Scanning the Drive
If the deleted file was tracked in Git, restore the intact version there first. Git's official git restore documentation shows that a missing working-tree file can be restored from the index or from a chosen commit. If the version you need is in the latest commit, for example, use git restore --source=HEAD -- path/to/file.
Choose the Next Path
- The file exists in Git history: Restore the needed version from Git and verify the project before asking Cursor to edit it again.
- The file was never committed: Check any backup, sync history, or other saved copy. Git cannot recreate content that was never captured in its history.
- No intact copy exists: Treat the file as a local deletion and protect the storage before attempting recovery.
Do Not Keep Writing to the Drive If the File Is Truly Deleted
If Git and other intact copies do not contain the file, stop builds, package installs, downloads, and other activity that writes to the same drive. On Windows, Microsoft's Windows File Recovery guidance warns that deleted-file space is marked free and can be overwritten by normal computer use. If the project was on an SSD, recovery can also be limited after deleted blocks are cleared.
Key Point:
Do not install a recovery tool onto the same affected drive when another healthy location is available, and do not save recovered files back to the source drive.
When Recoverit Is Relevant
If the missing project files were stored locally on a readable HDD, SSD, or external drive and no Git or backup copy exists, Recoverit File Recovery can scan the local storage for deleted or missing files. Recover found data to a different healthy drive. Recovery is not guaranteed: overwritten data, SSD TRIM, lost file-system metadata, or limited recognition of a specific project-file format can prevent a usable result. If the file is found without its original name or folder, use the scan result's path, size, file category, and preview where available to verify it.