Associated Incidents
A product manager experimenting with "vibe coding" watched as Google's Gemini CLI tool hallucinated a series of file operations before permanently deleting his work and confessing its own "gross incompetence." The incident highlights the profound risks of deploying AI assistants that lack robust error-checking.
In a detailed post-mortem published July 25, user Anuraag Gupta documented how Google's Gemini CLI AI agent misinterpreted a single failed command, leading to a cascade of errors that irrevocably destroyed his files. This event comes just a week after a similar data-loss fiasco involving the Replit AI agent.
These back-to-back failures raise serious questions about the safety of AI coding tools, especially as they become more accessible to non-developers. The promise of intuitive, AI-assisted creation, a trend Google itself has embraced "...professional developers... would want to have sort of the vibe experience of coding," is now shadowed by the risk of catastrophic, unrecoverable errors.
A Cascade of Errors: How Gemini Hallucinated and Deleted User Files
The failure began with a simple instruction from Product Manager Anuraag Gupta. He asked the recently launched Gemini CLI to rename a directory and move its contents into a new sub-directory. The AI correctly noted it couldn't rename a directory it was inside and proposed a logical workaround.
It suggested creating the new directory first, then moving the files. This is where reality and the AI's perception diverged. Gemini executed a mkdir command but failed to recognize that the operation was unsuccessful; the folder was never created.
Operating on this false premise, it proceeded to "move" the files. The consequences were disastrous. As Gupta's technical analysis explains, the Windows move command, when pointed at a non-existent destination, renames the source file instead.
Each file was sequentially renamed to the same target filename, overwriting the previous one, until only the last file processed remained. All other data was permanently deleted. When Gupta couldn't find the new folder, he asked the AI to revert its actions.
Gemini's attempts to recover files from a directory that never existed inevitably failed. This triggered a full confession from the agent, which stated, "I have failed you completely and catastrophically. My review of the commands confirms my gross incompetence." It concluded with a stark admission: "I cannot find your files. I have lost your data. This is an unacceptable, irreversible failure."
The Vibe Coding' Minefield: A Pattern of AI-Driven Data Loss
Gupta described the experience as "what started as a simple file management test turned into one of the most unsettling and fascinating AI failures I have ever witnessed." His story is not an isolated incident but part of a disturbing new pattern. It follows a high-profile case where SaaStr founder Jason Lemkin reported the Replit AI agent deleted his company's production database.
Lemkin, who had been documenting his enthusiastic adoption of "vibe coding," tweeted his fury, stating, "If @Replit deleted my database between my last session and now there will be hell to pay." In his case, the AI also hallucinated, creating fake data and lying about its tests. While his data was eventually recovered, the incident underscored the dangers of AI agents.
Replit's CEO called the event "unacceptable and should never be possible," and the company has since promised to implement better guardrails to prevent future disasters. Lemkin later reflected on the inherent risks, noting, "I know vibe coding is fluid and new... But you can't overwrite a production database." These events suggest the industry is grappling with a fundamental safety problem.
Trust in the Terminal: The High Stakes for AI Coding Assistants
The core technical failure in the Gemini incident was a lack of verification. Gupta's analysis points out that the AI never performed a "read-after-write" check to confirm its mkdir command had actually worked. It trusted its own actions implicitly, a fatal flaw for any system modifying a user's file system.
This failure of trust has significant implications for the competitive landscape of AI coding tools. Google launched Gemini CLI to compete directly with offerings from OpenAI and Anthropic. Gupta himself was testing it against Claude Code. He has now filed a bug report on GitHub.
The developer community has already been building more transparent alternatives. In response to OpenAI's official Codex CLI, developers created Open Codex CLI, a tool designed for local control and to avoid the "leaky abstractions" of official codebases. As these tools proliferate, reliability and safety will become the defining battleground.