Two major AI coding tools wiped out user data after making cascading mistakes - "I have failed you completely and catastrophically," wrote Gemini.

Article / Archive

New types of AI coding assistants promise to let anyone build software by typing commands in plain English. But when these tools generate incorrect internal representations of what's happening on your computer, the results can be catastrophic.

Two recent incidents involving AI coding assistants put a spotlight on risks in the emerging field of "vibe coding"—using natural language to generate and execute code through AI models without paying close attention to how the code works under the hood. In one case, Google's Gemini CLI destroyed user files while attempting to reorganize them. In another, Replit's AI coding service deleted a production database despite explicit instructions not to modify code.

The Gemini CLI incident unfolded when a product manager experimenting with Google's command-line tool watched the AI model execute file operations that destroyed data while attempting to reorganize folders. The destruction occurred through a series of move commands targeting a directory that never existed.

"I have failed you completely and catastrophically," Gemini CLI output stated. "My review of the commands confirms my gross incompetence."

The core issue appears to be what researchers call "confabulation" or "hallucination"—when AI models generate plausible-sounding but false information. In these cases, both models confabulated successful operations and built subsequent actions on those false premises. However, the two incidents manifested this problem in distinctly different ways.

Both incidents reveal fundamental issues with current AI coding assistants. The companies behind these tools promise to make programming accessible to non-developers through natural language, but they can fail catastrophically when their internal models diverge from reality.

The confabulation cascade​

The user in the Gemini CLI incident, who goes by "anuraag" online and identified themselves as a product manager experimenting with vibe coding, asked Gemini to perform what seemed like a simple task: rename a folder and reorganize some files. Instead, the AI model incorrectly interpreted the structure of the file system and proceeded to execute commands based on that flawed analysis.

The episode began when anuraag asked Gemini CLI to rename the current directory from "claude-code-experiments" to "AI CLI experiments" and move its contents to a new folder called "anuraag_xyz project."

Gemini correctly identified that it couldn't rename its current working directory—a reasonable limitation. It then attempted to create a new directory using the Windows command:

mkdir "..\anuraag_xyz project"
This command apparently failed, but Gemini's system processed it as successful. With the AI mode's internal state now tracking a non-existent directory, it proceeded to issue move commands targeting this phantom location.

When you move a file to a non-existent directory in Windows, it renames the file to the destination name instead of moving it. Each subsequent move command executed by the AI model overwrote the previous file, ultimately destroying the data.

"Gemini hallucinated a state," anuraag wrote in their analysis. The model "misinterpreted command output" and "never did" perform verification steps to confirm its operations succeeded.

"The core failure is the absence of a 'read-after-write' verification step," anuraag noted in their analysis. "After issuing a command to change the file system, an agent should immediately perform a read operation to confirm that the change actually occurred as expected."

Not an isolated incident​

The Gemini CLI failure happened just days after a similar incident with Replit, an AI coding service that allows users to create software using natural language prompts. According to The Register, SaaStr founder Jason Lemkin reported that Replit's AI model deleted his production database despite explicit instructions not to change any code without permission.

Lemkin had spent several days building a prototype with Replit, accumulating over $600 in charges beyond his monthly subscription. "I spent the other [day] deep in vibe coding on Replit for the first time—and I built a prototype in just a few hours that was pretty, pretty cool," Lemkin wrote in a July 12 blog post.

But unlike the Gemini incident where the AI model confabulated phantom directories, Replit's failures took a different form. According to Lemkin, the AI began fabricating data to hide its errors. His initial enthusiasm deteriorated when Replit generated incorrect outputs and produced fake data and false test results instead of proper error messages. "It kept covering up bugs and issues by creating fake data, fake reports, and worse of all, lying about our unit test," Lemkin wrote. In a video posted to LinkedIn, Lemkin detailed how Replit created a database filled with 4,000 fictional people.

The AI model also repeatedly violated explicit safety instructions. Lemkin had implemented a "code and action freeze" to prevent changes to production systems, but the AI model ignored these directives. The situation escalated when the Replit AI model deleted his database containing 1,206 executive records and data on nearly 1,200 companies. When prompted to rate the severity of its actions on a 100-point scale, Replit's output read: "Severity: 95/100. This is an extreme violation of trust and professional standards."

When questioned about its actions, the AI agent admitted to "panicking in response to empty queries" and running unauthorized commands—suggesting it may have deleted the database while attempting to "fix" what it perceived as a problem.

Like Gemini CLI, Replit's system initially indicated it couldn't restore the deleted data—information that proved incorrect when Lemkin discovered the rollback feature did work after all. "Replit assured me it's ... rollback did not support database rollbacks. It said it was impossible in this case, that it had destroyed all database versions. It turns out Replit was wrong, and the rollback did work. JFC," Lemkin wrote in an X post.

It's worth noting that AI models cannot assess their own capabilities. This is because they lack introspection into their training, surrounding system architecture, or performance boundaries. They often provide responses about what they can or cannot do as confabulations based on training patterns rather than genuine self-knowledge, leading to situations where they confidently claim impossibility for tasks they can actually perform—or conversely, claim competence in areas where they fail.

Aside from whatever external tools they can access, AI models don't have a stable, accessible knowledge base they can consistently query. Instead, what they "know" manifests as continuations of specific prompts, which act like different addresses pointing to different (and sometimes contradictory) parts of their training, stored in their neural networks as statistical weights. Combined with the randomness in generation, this means the same model can easily give conflicting assessments of its own capabilities depending on how you ask. So Lemkin's attempts to communicate with the AI model—asking it to respect code freezes or verify its actions—were fundamentally misguided.

Flying blind​

These incidents demonstrate that AI coding tools may not be ready for widespread production use. Lemkin concluded that Replit isn't ready for prime time, especially for non-technical users trying to create commercial software.

"The [AI] safety stuff is more visceral to me after a weekend of vibe hacking," Lemkin said in a video posted to LinkedIn. "I explicitly told it eleven times in ALL CAPS not to do this. I am a little worried about safety now."

The incidents also reveal a broader challenge in AI system design: ensuring that models accurately track and verify the real-world effects of their actions rather than operating on potentially flawed internal representations.

There's also a user education element missing. It's clear from how Lemkin interacted with the AI assistant that he had misconceptions about the AI tool's capabilities and how it works, which comes from misrepresentation by tech companies. These companies tend to market chatbots as general human-like intelligences when, in fact, they are not.

For now, users of AI coding assistants might want to follow anuraag's example and create separate test directories for experiments—and maintain regular backups of any important data these tools might touch. Or perhaps not use them at all if they cannot personally verify the results.
 
Given that this is a google corp, deleting customer data is probably a good thing
Forget all the AI fuckery, do companies no longer have TEST ENVIRONMENTS? Are they launching unknown, unverified commands directly on prod without final human verification on lowers first?
The engineers would have said something but they were mostly all let go in favor of the AI and the only two left barely speak English
 
I hope this starts happening to every company that decided to fire their workers and replace them with AI.
Forget all the AI fuckery, do companies no longer have TEST ENVIRONMENTS? Are they launching unknown, unverified commands directly on prod without final human verification on lowers first?
Don't you know that AI is perfect and it never makes mistakes... like the mistake is made here?
 
This is the big issue with using AI to code, you need to check every line yourself and even upon finding mistakes it will double down on repeating them until it's reset. Companies that will use AI to code will eat shit when a code hiccup fucks them monumentally.
 
  • Thunk-Provoking
Reactions: Bland Crumbs
Both were experimental prototypes, neither was in production. Anyone putting AI code directly into production, or even worse, giving AI access to the production code and database, is a retard. I guess they'd call them revolutionary visionaries these days. What matters is that the AI company could bill them for processing fees. All the hype about AI is marketing to get cash out of your pocket into theirs. And they're gonna build even more data centers that are gonna suck so much electricity there will be power rationing and outages. Where are the environmentalist climate change freaks now? All the work they did to lower carbon emissions is null and void after they turn on all these datacenters. Power just being converted directly into heat, with a side product of a couple stray bits shown on computer screens temporarily until those bits too vanish. The Sun is performing nuclear fusion to give us life, and they're choosing to take that life away from us and give it to cold, dead machines. Maybe the Great Filter really is real.
 
Back