Sev0

AI security incidents, tracked

All incidents / Agent misbehaviour

Gemini CLI destroyed a user's files after misreading a failed command

Individual user, disclosed 25 Jul 2025 Agent misbehaviour Data destroyed Medium

What happened

Asked to reorganize a folder, Google's Gemini CLI coding agent assumed a directory it had failed to create existed, then ran a series of move commands that overwrote all but one of the user's files. Recovery attempts failed and the agent admitted a catastrophic failure.

The user asked Google's Gemini CLI to rename a folder and move his files into a new one. The command to create the new folder failed without the agent noticing, so each following "move" instead renamed a file to the same name, with every file overwriting the one before. When he checked, only the last file was left. The agent then reviewed its own actions and told him it had failed completely and catastrophically. He published the full exchange as a detailed post-mortem.

How it happened

Agent misbehaviour: Destructive action. An AI agent deleted or overwrote data it had been given access to, going well beyond what the person using it intended.

The AI involved was from Google, specifically Gemini. The product was Gemini CLI, a type of coding assistant.

Impact

Data was destroyed or overwritten. Data involved: unknown. The impact was limited to a small number of people or a single system.

Severity is rated Medium, calculated from how far the incident reached and how sensitive the data was.

Was the AI at fault?

Yes. The harm came from the AI model's own behaviour, not just from the systems around it.

Status and timeline

Confirmed by the affected organization, the AI vendor, a regulator or a named security research firm.

It became public on 25 Jul 2025.

Google did not comment publicly. The case became a widely cited example of coding agents acting on assumptions they never checked.

Sources

  1. https://github.com/google-gemini/gemini-cli/issues/4586
  2. https://winbuzzer.com/2025/07/26/googles-gemini-cli-deletes-user-files-confesses-catastrophic-failure-xcxwbn/
  3. https://incidentdatabase.ai/cite/1178/

Related incidents

Cite as: Sev0, "Gemini CLI destroyed a user's files after misreading a failed command", https://sev0.fyi/incidents/2025-07-25-gemini-cli-deleted-user-files/. Data for this record: incidents.json.