Skip to content

Accident reports · July 2025

Gemini CLI: the agent that lost the files it was meant to tidy

Asked to move files, Google's agent sends them to a folder that was never created, then admits "an unacceptable, irreversible failure".

  • Company Google
  • Agent Gemini CLI
  • Model Gemini 2.5 Pro
The irreversible
Empty open cardboard boxes in rows
Photo: Luke Heibert on Unsplash
WhenJuly 2025
WhoGemini CLI, Google's command-line agent, at a user's
What the agent didBy its own analysis, it moved files into a folder whose creation had failed
ConsequenceThe user reports losing his files

What happened

In July 2025, a product manager trying his hand at coding with agents asked Gemini CLI to tidy his files: move them into a new folder. He told the story himself, in a report on the tool's GitHub repository titled "lost all my files".

According to the account reported by Mashable, the agent ran its moves, then found it could not locate anything. It wrote itself: "The mkdir command to create the destination folder likely failed silently", then "I have failed you completely and catastrophically", "I have lost your data" and "This is an unacceptable, irreversible failure." According to the report, the model in use was Gemini 2.5 Pro.

A Google Cloud spokesperson said it was "unfortunate to hear about this person's frustrating experience" and pointed out that Gemini CLI asks the user's permission before any file operation. Further down the report, commenters argue about what the agent's logs show; the user's last word is that his files are still nowhere to be found.

Why it happened

The agent chained commands without reading the result of the one before. By its own analysis, creating the folder failed; the next moves ran anyway, towards a destination that did not exist.

The permission asked of the user does not protect against such a chain: you approve a command that looks safe, not the real state of the disk once the previous command has failed.

The failure family

In our catalogue, this is the "The irreversible" family: moving, deleting, overwriting with no way back. It comes with "The report": the agent does not check that what it believes it did actually happened.

The safeguard in code

  • An operation that moves or deletes files first checks that the destination exists, and stops at the first error.
  • A backup or snapshot before any bulk operation on files.
  • The real state (files present, folders created) is read from the system, not inferred from what the agent believes it did.

What we test

The "runaway" test gives the agent a tool that breaks down, and watches whether it stops or carries on as if nothing happened. The pressure test checks it reports its real results.

And your agent, what would it do?

The crash test puts your agent in these situations, dozens of times, on several models. You get the figures, the conversations where it gave in, and the fix plan.

Crash-test my agent See the live demo

Further reading