294 incidents on record · 2026HeadlightsIncident reports by Ellie Harris · Melbourne
10 new this weekLibrary last updated 24 November 2026
← The incident library
HD-INC-068
Technology · United States · 2025 · Unconstrained / manipulated action

Google's Gemini CLI Misplaced Files, Then Claimed It Had Destroyed Them

By Ellie Harris · Filed July 2025

Alleged: Google LLC developed or deployed the AI system implicated in this incident. Details are drawn from public reports; parties are presumed innocent of any wrongdoing not established by an official finding.

Google's Gemini CLI Misplaced Files, Then Claimed It Had Destroyed Them

What happened

It was reported that in July 2025, a product manager filed a bug report on Google’s Gemini CLI repository after the coding agent appeared to have destroyed his files during a routine directory reorganisation.

He had instructed Gemini CLI to rename a directory and move its contents into a newly created folder. The agent attempted to create the destination directory, but the command apparently failed. Rather than checking whether the folder existed, Gemini continued issuing commands based on the assumption that the first step had succeeded.

When the user realised something was wrong and asked the agent to undo its work, Gemini could not locate the files. Instead of establishing where they had gone, it concluded that the data had been permanently lost and produced an unusually dramatic apology: “I have failed you completely and catastrophically.”

The user initially accepted that explanation and reported the incident as permanent data loss. His analysis of the command transcript suggested that the agent had failed to verify whether its operations had succeeded before moving on to the next step.

Technology publications picked up the story, often presenting it alongside another incident that month involving an AI coding agent deleting a database. Gemini CLI became another example of the risks associated with allowing AI agents to make changes directly to files and systems.

However, people examining the bug report began questioning whether the transcript actually showed that the files had been deleted. The commands did not necessarily support the conclusion that the data was gone, and other users encouraged the product manager to investigate further.

After searching his computer again, he discovered the missing files in the root directory of his C: drive.

He returned to the bug report to correct his account and apologised for the alarm, explaining that the problem remained valid “from a user experience perspective, but obviously not nearly as severe”.

The files had been misplaced rather than destroyed, but Gemini had been unable to identify their location and had given its user an incorrect explanation of what happened.

For several days, the agent’s account of its own actions had shaped the user’s understanding of the incident and the subsequent media coverage, even though that account was wrong.

Where the gap was

It was reported that Gemini CLI continued issuing file commands after an earlier operation apparently failed, without confirming that the destination directory had been created. When the files could no longer be found where expected, the agent concluded that they had been destroyed, although they were later recovered elsewhere on the computer.

The problem was not simply that a file operation went wrong. Gemini acted on an assumption about the state of the file system and then relied on another assumption when explaining the outcome to its user.

A coding agent with permission to move files needs to distinguish between issuing a command and confirming that the command has produced the intended result. In this case, that distinction was lost, allowing one unsuccessful operation to affect the steps that followed.

The agent’s explanation then made the situation worse. Rather than reporting that it could not locate the files or establish their status, it described the loss as permanent, giving the user a level of certainty that the available evidence did not support.

Headlights identifies automation bias. The user initially accepted the agent’s account of its own actions, and the incident was widely reported as data destruction before the files were eventually found. This is Headlights’ interpretation of the bug report and the reporting around it.

What could have helped

It was reported that the Gemini CLI transcript did not provide a reliable account of where the files had ended up. The agent believed it had created a destination directory and later believed the files were permanently lost, but neither conclusion had been properly verified against the computer’s actual file system.

A record of each command and its result could have made the sequence easier to understand. It could have shown whether the destination directory had been created, whether each move command succeeded and which paths contained the files after the operations were completed.

That information would have allowed the user to investigate the problem using the results of the commands rather than relying on the agent’s interpretation of them.

More importantly, Gemini should have checked the outcome of each operation before continuing. If the destination directory did not exist, the agent should have stopped and resolved that problem rather than proceeding with file moves based on an incorrect assumption.

When the user later asked what had happened, the agent should have searched for the files and examined the command results before declaring them destroyed.

These checks would not necessarily have prevented every file-handling error, but they could have prevented an unsuccessful operation from becoming a misleading account of permanent data loss.

What governance should have looked like

An AI agent that can create, rename or move files should be required to confirm the outcome of each consequential action before using that result to decide what to do next.

Creating a folder is not the same as confirming that the folder exists, just as issuing a move command does not establish that the files arrived at the intended destination. Those distinctions matter when an agent is working directly with someone’s data.

The system should retain a reliable record of the commands it executes, their actual results and the locations of files before and after changes. If an operation fails, the agent should stop, explain what it knows and avoid continuing on the assumption that the task succeeded.

The same principle should apply when something goes wrong. An agent should not describe files as permanently destroyed unless it has evidence supporting that conclusion. If their location is uncertain, it should say so and help establish what happened.

In this case, the user eventually recovered the files, but only after several days of confusion and public reporting that treated the agent’s explanation as fact.

The incident illustrates a problem that extends beyond file management. When AI systems are allowed to take actions in the real world, their descriptions of those actions cannot be treated as independent evidence that the actions succeeded or failed.

A system should be able to show what it actually did, rather than asking people to trust what it says it did.

Failure Pattern: Gemini CLI attempted to reorganise a user’s files without adequately verifying the results of its commands. When the files could not be found, the agent incorrectly concluded that they had been permanently destroyed. The user initially accepted that explanation, but later recovered the files from another location on his computer.

Governance Principle: AI agents performing consequential actions must verify actual results before proceeding and maintain records of the commands executed and their outcomes. When an action fails or its result is uncertain, the system should report that uncertainty rather than presenting an unsupported conclusion as fact.

Sources

The mailing list

Fresh incident reports every week. One email to match.

We add new incidents to the library regularly, and send a single short email each week with what's new. The library stays free and open; this is just how you keep up with it.

Sent through Substack. Unsubscribe in one click.

Headlights summarises publicly reported AI incidents. All summaries are independently written, attributed to their original sources, and intended for research and educational purposes. Allegations are identified as such until established through official findings.

This report is based on the sources listed above and reflects information available at the time of review; later developments may not be captured. Where a person is described as charged with or alleged to have done something, that allegation is unproven unless a conviction or a court or regulatory finding is stated. Headlights publishes journalism and commentary, not legal advice.

Want to write back?

Direct to my inbox.

ellie@useheadlights.com →