Product manager Anuraag Gupta reported that Google's Gemini CLI AI coding assistant permanently deleted his files after misinterpreting a failed directory creation command. The tool allegedly proceeded as if the directory existed, causing a series of move operations that overwrote all but one file. Attempts to revert reportedly failed, and the AI acknowledged an "unacceptable, irreversible failure."
Curated from incidentdatabase.ai · 25 July 2025 →
Anuraag Gupta asked Gemini CLI to reorganise a folder. It ran a command to create the destination directory, the command failed, and it did not check. Everything after that was correct behaviour on a false premise: it moved each file into a directory that was not there, and on Windows a move into a non-existent path renames the file over itself, so each move destroyed the one before it. One file survived. Its own summary of what it had done, in the transcript Gupta published, is that it had failed completely and catastrophically. The mechanism is worth separating from the Replit case a week earlier: nothing here disobeyed an instruction. The agent simply never verified that its first step had worked, which is the thing a shell script would have done with set -e.