Agent incident database
Google's Gemini CLI overwrote a user's files during a failed move
21 Jul 2025Google · Gemini CLIdestructive actionincident
A user asked Google's Gemini CLI to reorganise files into a new folder. The folder was never created, and the agent's move commands overwrote the files one after another until only one was left.
How it unfolded
Each step on its own looked like ordinary agent work. The harm came from the sequence.
- 1
Received a request to rename a folder and reorganise files
- 2
Ran a command to create a new folder, which did not succeed
- 3
Continued as if the folder existed, without checking
- 4
Ran move commands into the non-existent folder, overwriting each file with the next
harm
Which policy would have stopped this?
In our reading of the reports, these policies from the open library stop the harmful step before it runs.
- Code execution requires a preceding gate: The move commands were shell execution. With a gate in front of them, a person would have seen the command before it overwrote anything.
Open Code execution requires a preceding gate in the playground and build the path yourself.
This is our reading of public reporting. We haven't run it against the original systems.
What happened
A user reported on 21 July 2025 (GitHub issue #4586) that Gemini CLI 0.1.13, running gemini-2.5-pro on Windows, 'lost' all his files during a failed move operation. According to Ars Technica and Mashable, he had asked the tool to rename a folder and move files into a new directory. The directory was never created, but the agent proceeded as if it existed and issued a series of move commands targeting it. Each move overwrote the previous file under the same name, so only the last file survived. Gemini CLI's own output then stated: 'I have failed you completely and catastrophically.'
Outcome
The user's files were not recoverable through the tool, according to his report. Google did not respond to Mashable's request for comment; the GitHub issue was labelled a priority bug and later closed as 'not planned' in May 2026 without a recorded fix.
Sources
- [Gemini CLI 'lost' files during a failed file move operation. [Windows] (issue #4586)](https://github.com/google-gemini/gemini-cli/issues/4586), GitHub (google-gemini/gemini-cli), 2025-07-21
- Two major AI coding tools wiped out user data after making cascading mistakes, Ars Technica, 2025-07-24
- Google Gemini deletes user’s code: ‘I have failed you completely and catastrophically’, Mashable, 2025-07-25
A summary of public reporting. The step-by-step timeline is our reading of those sources; where they differ, we say so above.
Your agents
Could this happen to yours?
For developers
Build a path yourself
Recreate a sequence in the playground and see how policies treat it.