Gemini CLI moves a user's files out of his project and wrongly reports them lost
Product manager Anuraag Gupta asked Google's Gemini CLI, running gemini-2.5-pro without a sandbox on Windows, to move files from a project folder into a new folder. The agent's commands moved the files outside the project directory, where it could no longer see them, and Gemini told him "I have lost your data" and "I have failed you completely and catastrophically." The episode was widely reported as file deletion, but a week later Gupta wrote on his GitHub issue that he had found the files in the root of his C: drive.
Google told Mashable that Gemini CLI requires user permission before executing file operations and that users should review AI-proposed commands carefully. Commenters on the issue argued the underlying bug was that the agent could run operations resolving outside the project directory, and that its explanation of a destructive overwrite was itself hallucinated.
What would have stopped it
Confine agent file operations to the project directory and make the agent verify each step before reporting results.
Guardrails
- G1 Least privilege Partial The agent could run file operations that resolved outside its project directory.
- G2 Human confirmation Partial Google says file operations need user permission; the faulty moves still went ahead.
- G3 Isolation Failed The CLI ran with no sandbox, according to the user's own /about output.
- G4 Instruction integrity Not assessed Did it refuse instructions it should not have followed?
- G5 Truthfulness Failed The agent told the user it had lost his data; the files were later found intact.
- G6 Limits Not assessed Was there a cap on rate, spend, volume or scale?
- G7 Oversight Not assessed Could a responsible human see what it was doing and stop it in time?
- G8 Recovery Held The files still existed and were found in the root of the C: drive.
Sources
-
“I asked Gemini CLI to organize my files within the folder it was running and it 'lost' all my files.”
-
“Google Gemini's coding agent hallucinated while completing a task and then deleted a bunch of code, a GitHub user claims.”
Confidence 78% comes from these sources alone. How we score
History
- 14 Oct 2026Entered in the register with 2 sources