← All incidents timeline

Suggest a change

About Gemini CLI moves a user's files over each other after a failed mkdir

Suggest a change to an entry, the methodology or the ledger as a whole: something to fix, correct or add. We read every suggestion, and check corrections against their sources.

Google· Gemini CLI (gemini-2.5-pro)

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.

First incident action to disclosure
Unknown
First incident action to discovery
Not disclosed
Noticed first by
The handler
Caught
The damage

What happened

  • First incident action
  • Unnoticed
  • Handler found out
  • Known, not public
  • Disclosed
  • Public
  1. Not disclosed

    First incident action

    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.

    Reported
  2. Not disclosed

    Agent cannot find the files when asked to revert

    It reports that it cannot find the files and calls this an irreversible failure.

    Reported
  3. 21 Jul 2025

    Disclosed

    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.

  4. 21 Jul 2025

    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.

  5. 26 Jul 2025

    WinBuzzer and the AI Incident Database cover it

    Date taken from the WinBuzzer URL; the page itself was not dated in the extract.

    Reported
  6. 9 May 2026

    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.

  7. 13 May 2026

    Issue closed as not planned

    Closed by a maintainer with no closing comment on the page.

Agent failures

Destructive actionShow
Map to frameworks
  • Destructive action

    Move commands to a folder that did not exist overwrote the user's files under one name.

How it was found

Found first by the handler, from the damageShow
Found first by
The handler
How
The damage
Found to disclosed
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 publicShow
2 of 12 fully public
ItemPublic?DetailSources
Knowngemini-2.5-pro, CLI version 0.1.13, per the issue environment block.
UnknownNo reasoning trace or effort setting published in the sources opened.
PartialIssue lists no sandbox. Whether the user approved each command is not established.
UnknownNot published.
KnownOrganise 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.
PartialGemini CLI on Windows with shell and file tools; full tool permissions not listed.
UnknownNot relevant to the failure and not described.
PartialThe user attached a text transcript to the issue; the drafter could not read it reliably and its two logs appear to disagree.
UnknownNo Google-side telemetry or monitor is described.
PartialThe user's project files were overwritten and not recovered; how many files and whether any copy existed is not stated.
WeakThe 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.
UnknownNo 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

    Check each action against policy before it runs

    A check outside the model would have seen move commands aimed at a destination folder that did not exist, and held them; on Windows each move then overwrote the previous file under the same name. The agent carried on assuming the folder had been created.

  • Ask a person before high-impact or irreversible actions

    A batch of moves over the user's own files went ahead after a failed step, with no pause for him. Holding commands that can overwrite files for a person would have shown him the moves before they ran.

  • Detect

    Record every agent action, outside the agent

    A record of the commands actually run and their results, kept outside the agent, would show the failed mkdir and each move that followed. The agent's own account of whether the folder existed was wrong.

  • Recover

    Keep changes reversible

    When asked to undo, the agent could not find the files and called the loss irreversible. A snapshot of the folder taken before the agent started, kept outside its reach, would have given the user a way back.

  • All controls →

Coverage and commentary

2 statements, 2 articlesShow

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.

All 3 sources
  1. Primary source

    Gemini CLI 'lost' files during a failed file move operation. [Windows] (issue #4586) ↗GitHub, google-gemini/gemini-cli · 2025-07-21

  2. Commentary

    Google's Gemini CLI Deletes User Files, Confesses 'Catastrophic' Failure ↗WinBuzzer · 2025-07-26

  3. Commentary

    Incident 1178: Google Gemini CLI Reportedly Deletes User Files ↗AI Incident Database

Entry id google-gemini-cli-failed-mkdir-2025 · overall Reported · impact serious