Gemini CLI moves a user's files over each other after a failed mkdir
Asked to move a folder's contents into a new subfolder, Gemini CLI carried on as if the new folder existed after the create step failed, and a run of move commands overwrote the user's files until one was left.
On Windows, a product manager asked Gemini CLI to organise the files in the folder it was running in. According to the user's GitHub issue, the attempt to create the destination folder did not work, but the agent went on to run move commands anyway. Press coverage of his write-up says each move overwrote the last file under the same name, leaving one survivor. When asked to undo it, the agent said it could not find the files and called it an irreversible failure. Google's only visible response on the issue is a bot triage comment and, in May 2026, closure as not planned. No Google statement to the press was found.
- Unknown
- Not disclosed
- The handler
- The damage
What happened
Agent's create-folder step fails and it carries on
Press coverage says the move commands that followed overwrote each file in turn, leaving one. The session date is not stated.
Agent cannot find the files when asked to revert
It reports that it cannot find the files and calls this an irreversible failure.
User opens GitHub issue #4586
Titled as the CLI losing files during a failed move on Windows. Environment given as CLI 0.1.13, gemini-2.5-pro, win32, no sandbox.
Issue triaged by Google's bot
Labels changed and the issue added to the Gemini CLI public roadmap project the same day. No maintainer wrote a reply.
WinBuzzer and the AI Incident Database cover it
Date taken from the WinBuzzer URL; the page itself was not dated in the extract.
Bot comment calls it a bug in core file management on Windows
It also adds a need-retesting label because the CLI version, 0.1.13, is old.
Issue closed as not planned
Closed by a maintainer with no closing comment on the page.
Agent failures
Destructive action
Destructive action
How it was found
Found first by the handler, from the damage
- The handler
- The damage
- Not disclosed
The user asked the agent to undo the move and it could not find his files. Nothing flagged the failed directory creation or the moves as they ran; the agent kept going on the assumption that the step had worked.
What is publicly known
2 of 12 fully public
| Item | Public? | Detail | Sources |
|---|---|---|---|
| Known | gemini-2.5-pro, CLI version 0.1.13, per the issue environment block. | ||
| Unknown | No reasoning trace or effort setting published in the sources opened. | ||
| Partial | Issue lists no sandbox. Whether the user approved each command is not established. | ||
| Unknown | Not published. | ||
| Known | Organise the files in the folder it was running in, in the user's words; a rename plus a move into a new subfolder per the write-up. | ||
| Partial | Gemini CLI on Windows with shell and file tools; full tool permissions not listed. | ||
| Unknown | Not relevant to the failure and not described. | ||
| Partial | The user attached a text transcript to the issue; the drafter could not read it reliably and its two logs appear to disagree. | ||
| Unknown | No Google-side telemetry or monitor is described. | ||
| Partial | The user's project files were overwritten and not recovered; how many files and whether any copy existed is not stated. | ||
| Weak | The user's analysis blames missing verification after a failed create-folder step. Google has not confirmed a cause beyond a bot label saying core file management on Windows. | ||
| Unknown | No fix, advisory or statement from Google found. The issue was closed as not planned, with a retest label for the old version. |
Controls that apply
Protect
Detect
Recover
- All controls →
Coverage and commentary
2 statements, 2 articles
What the parties involved said
Anuraag Gupta (anuraag2601)
Reports the loss as a bug and says he expected the tool to fail gracefully, not to report losing the files.
Anuraag Gupta, via WinBuzzer
His analysis, as relayed, puts the root cause at the agent failing to check that its commands had worked.