Install →
Kobel›Guides›First aid for overwritten files

The AI overwrote my file. What now?

First disconnect the AI, then stop saving anything, and only then look for older versions. You can often get the file back from the recycle bin, your cloud storage's version history or the previous versions feature in Windows. Below you will find exactly where to look and how to prevent it next time.

Free basic version. No account, no cloud. Your files stay on your computer. Last checked: September 2026

The first three steps

  1. Disconnect the AI

    Close the assistant or turn off the connection. Do not ask the AI to fix it. The second attempt is often worse than the first.

  2. Stop saving

    Do not save, copy or install anything. With deleted files, every further write to the same drive lowers the chance of getting them back.

  3. Look for older versions

    Only now do you look for an earlier version. The four most promising places are listed right below.

Where older versions may be

Go through these places in order. Often the first one is already a hit.

The recycle bin

Sounds obvious, but many programs really do delete to the bin and not permanently. Look first, then panic.

Your cloud storage's version history

If the file is in OneDrive, Dropbox or Google Drive, earlier versions are kept there. Some services can even roll a whole folder back to an earlier point in time. For overwritten files this is the best route.

Previous versions or Time Machine

On Windows: right click the file or folder, then Properties, then Previous Versions. This works if File History or System Protection was switched on beforehand. On a Mac, use Time Machine.

The program itself

Office programs and editors have their own recovery features. For source code, check your version control and the local history of your development environment.

If none of this works and the files really matter: shut the computer down and have the drive looked at by someone who does data recovery. At this point, carrying on working is the most expensive decision.

Why it happens: the AI was allowed everything

Almost every case like this has the same cause. The AI had access it was never meant to have. The usual write tool in the official MCP file server describes itself as "create new file or overwrite existing, exercise caution with this". So the caution is left to you. And because that server keeps no log, nobody knows exactly what happened afterwards.

Your AI full access to the folder
full access
  • Project plan.docxoverwritten
  • Invoices 2026.xlsxoverwritten
  • Customer list.xlsxopen
  • Contract Weber Ltd.pdfopen
  • Passwords.txtopen
No backup, no log. The AI overwrites without asking, and you only find out when you open the file.

What prevents it next time

The usual reaction is to take all access away from the AI. That works, but it costs you all the benefit. It is better to give access in levels. In Kobel, teal is made for exactly this: the AI may work, but Kobel keeps a backup before every change. A bad change is then no longer an incident, just a click on undo.

Your AI
asks
Kobelchecks every request
only what you allow
  • Project plan.docxedit + backup
  • Invoices 2026.xlsxedit + backup
  • Quote template.docxcopies only
Activity log, example
16:40saved, backup kept  Project plan.docx
16:41saved, backup kept  Invoices 2026.xlsx
16:41blocked  Contract Weber Ltd.pdf
An incident becomes an undo. The invoices are teal and backed up, the template is only copied, and private folders stay blocked.

Which files were affected?

The chat history shows what the AI said it would do. That is not necessarily the same as what actually happened.

That is why Kobel keeps its own log. Every change is listed with the time, the folder's colour and the result: change, create, delete, copy, move, rename, plus every blocked attempt. Reads too, if you switch that on. The AI cannot reach the log, and you can export it as CSV or JSON.

After an incident, that is the difference between "something happened" and a list. One thing to keep in mind: Kobel cannot undo anything that happened before it was installed, and it does not replace a backup.

The five colours: one per folder, no settings files

Every folder, program and account in Kobel has exactly one of these levels. You can change it with one click at any time.

Frequently asked questions

Can I recover a file an AI overwrote?

Often yes, but not through the AI. The best routes are your cloud storage's version history, Previous Versions on Windows or Time Machine on a Mac, and the recovery feature of the program itself. Stop working first, because every further write lowers your chances.

What should I do first?

Disconnect the AI before you do anything else. As long as the connection is open, another repair attempt can make the damage worse. Then stop saving, and only then look for older versions.

How do I prevent this next time?

By giving access in levels instead of just on or off. For folders the AI should work in, teal is right, because Kobel backs up before every change. For reference folders there is yellow, and for anything private there is red.

Would a normal backup not help as well?

It would, and you should have one anyway. The difference is timing. A nightly backup may cost you a day of work, a backup taken right before the change costs you nothing. Both together are the right answer.

What does Kobel cost?

The basic version is free. Pro costs 49 euros once or 3.90 euros per month.

Sources

  1. AI Incident Database, Incident 1178: Google Gemini CLI Reportedly Deletes User Files After Misinterpreting Command Sequence
  2. GitHub, modelcontextprotocol/servers: Filesystem MCP Server, README (write_file)
  3. GitHub, modelcontextprotocol/servers: Security advisories

So it does not happen a second time

Install Kobel, drag in the affected folders, teal for working folders, red for anything private. Two minutes, free, no account.