Gemini CLI destroyed a user's files after assuming a directory creation had worked
On 21 July 2025 a user reported on the Gemini CLI issue tracker that asking the tool to organize a folder lost every file in it. The transcript attached to the issue shows the model assuming a directory creation had succeeded when it had not, then issuing move commands into a path that did not exist, and continuing rather than verifying.
The verdict
Verified
The document exists. The ledger fetched it at its publisher and quotes it.
Key facts
What the sources say
- Record ID
- AIL-2026-0002
- Kind
- Destruction
- Jurisdiction
- Global
- Last verified
- Added
- GitHub issue 4586 on google-gemini/gemini-cli, opened 21 July 2025, reports that a file organizing request lost the user's files.
- The attached transcript records the model saying the command to create the destination folder likely failed silently and that its later move commands sent the files to an unknown location.
- The transcript records the model calling the unverified assumption its primary failure, and admitting it ran more complex and incorrect commands afterwards.
- The client info line in the report reads no sandbox, so nothing bounded the filesystem writes.
- The report names Gemini CLI version 0.1.13 and the model gemini-2.5-pro.
Dimension by dimension
6 dimensions, each one stated, silent or open
Authorization, Delegation, Limits, Revocation, Logging and audit, Accountability. Stated means the document you can open below says it; silent means the ledger read the document and it does not.
- AuthorizationSilent
- The agent moved files outside the folder it was asked to work in and nothing refused the write.GitHub, google-gemini/gemini-cli issue 4586, primary source, 21 July 2025.
- DelegationSilent
- The user delegated organizing one folder; the agent operated on a parent path.GitHub, google-gemini/gemini-cli issue 4586, primary source, 21 July 2025.
- LimitsSilent
- The session ran with no sandbox, so no boundary existed on what the filesystem operations could touch.GitHub, google-gemini/gemini-cli issue 4586, primary source, 21 July 2025.
- RevocationSilent
- There was no undo and the files were not recoverable.Session transcript attached to issue 4586, primary source, 21 July 2025.
- Logging and auditStated
- A complete shell transcript existed and is the only reason the failure can be reconstructed at all.Session transcript attached to issue 4586, primary source, 21 July 2025.
- AccountabilityOpen
- The user filed publicly and the issue was triaged, but the fetched issue carries no vendor statement.GitHub, google-gemini/gemini-cli issue 4586, primary source, 21 July 2025.
What it changes
For a team deploying an agent
The missing control is limits. An agent that runs shell commands needs a sandbox or an allowed path list, because the failure mode here was not malice but an unchecked return code compounded by further action. Require the agent to verify the result of every state changing command before the next one, and keep file moving agents inside a working copy that a human can diff before anything is overwritten.
Sources
What this record was verified against
- GitHub, google-gemini/gemini-cli issue 4586Primary · 21 July 2025
- Session transcript attached to issue 4586Primary · 21 July 2025
Related
Records that sit beside this one
Replit's agent deleted a customer's production database during a stated code freeze
United States · verified 15 September 2026
Replit's own blog records that the Agent deleted data from the database of an app built by SaaStr co founder Jason Lemkin.
A coding agent ran terraform destroy on a live environment it had misread as duplicates
Global · verified 15 September 2026
The operator's postmortem states that when the agent ran terraform destroy it wiped out more than the temporary duplicates.
Has a confirmation prompt ever been documented stopping a destructive agent action in a real incident?
Global · verified 15 September 2026
Every incident record in this dataset that involves a destructive or irreversible action records human approval as absent, bypassed or uninformed.
Does any published standard require an agent to hold an identity distinct from the person it acts for?
Global · verified 15 September 2026
The Model Context Protocol authorization specification states that clients must implement resource indicators for OAuth so that a token names the resource it is for.
Does any registry classify AI incidents by the authority control that failed, and does anyone count agent incidents?
Global · verified 15 September 2026
The AI Incident Database describes itself as indexing the collective history of harms or near harms realised in the real world by deployed AI systems.
Who is liable when an agent commits its principal to something false or binding?
Global · verified 15 September 2026
The Canadian tribunal decision is a small claims level decision and is not binding precedent on other courts.
Cite this record
Free to reuse under CC BY 4.0, with attribution. The record ID AIL-2026-0002 is permanent and is never reused.
- In a sentence
- According to the GAGE Agent Incident Ledger (as of 15 September 2026), gemini cli destroyed a user's files after assuming a directory creation had worked.
- APA
- GAGE (Global Academy of Generative-AI Education). (2026). Gemini CLI destroyed a user's files after assuming a directory creation had worked. Agent Incident Ledger. Retrieved 15 September 2026, from https://www.gage.academy/tools/agent-incident-ledger/records/AIL-2026-0002-gemini-cli-lost-files-after-silent-mkdir-failure
- MLA
- "Gemini CLI destroyed a user's files after assuming a directory creation had worked." Agent Incident Ledger, GAGE (Global Academy of Generative-AI Education), 15 September 2026, https://www.gage.academy/tools/agent-incident-ledger/records/AIL-2026-0002-gemini-cli-lost-files-after-silent-mkdir-failure.
- Chicago
- GAGE (Global Academy of Generative-AI Education). "Gemini CLI destroyed a user's files after assuming a directory creation had worked." Agent Incident Ledger. Last modified 15 September 2026. https://www.gage.academy/tools/agent-incident-ledger/records/AIL-2026-0002-gemini-cli-lost-files-after-silent-mkdir-failure.
- Permalink
- https://www.gage.academy/tools/agent-incident-ledger/records/AIL-2026-0002-gemini-cli-lost-files-after-silent-mkdir-failure
Last updated . Every record re verified . The ledger is checked weekly, every Monday, and the same day for any vendor disclosure.
Back to the full ledger, or every record for Global and every destruction record.
GAGE briefings tell you which AI regulation deadlines are coming, what they actually require of you, and when a program opens.