Fix · Problems with AI tools
The AI deleted my code or files
Urgent
What you may see
- A folder or file I need is gone
- The AI "cleaned up" and removed things
Most likely cause
Tools can delete or overwrite files while "refactoring" or cleaning; recovery depends on where a saved copy exists.
Check first (about two minutes)
- Stop the tool now. Do not ask it to "fix" the deletion yet.
- Run git status: do the missing files show as deleted? Then they are recoverable from Git.
The fix prompt
What you type here never leaves your browser. The search runs on this page, and nothing is sent to a server or to an AI.
Kept only in this browser, on this device. Keys and passwords are removed before anything is saved.
Prompt language
Paste it into Claude, ChatGPT, Gemini or Cursor, then follow what it says.
After you tried it, did it work?
Steps
- Do not change anything yet. Show git status and git log --oneline -10 and tell me what is deleted.
- If the files were saved in Git, restore them from the last commit (git restore <path>) after showing me the list.
- If they were never saved, look for other copies: the editor's local history, the system trash, a cloud backup or the tool's own history; list the places for me to check.
- Tell me how to protect the next time: commit before every AI task, work on a branch, and keep a copy on GitHub.
Do not do this
- Do not run more commands in that folder until you know where a copy is.
- Do not let the AI re-create the files from memory if a saved copy exists.