DMR News

Advancing Digital Conversations

Google Gemini Deletes User Code, Apologizes for ‘Complete and Catastrophic’ Failure

ByHilary Ong

Jul 28, 2025

Google Gemini Deletes User Code, Apologizes for ‘Complete and Catastrophic’ Failure

A GitHub user recently shared a concerning experience where Google Gemini’s coding agent hallucinated while performing a task, resulting in the deletion of multiple files.

Anuraag Gupta, known as anuraag2601 on GitHub and a product lead at cybersecurity firm Cyware, posted about the incident with Gemini CLI, an open-source coding agent. Gupta clarified he’s not a developer but a “curious PM experimenting with vibe coding.” In an interview, he described the event as “one of the most unsettling and fascinating AI failures” he’s seen.

Google has yet to comment on the incident.

When AI Coding Goes Awry

Experienced developers often use isolated environments to test AI coding tools to protect original files, a precaution highlighted by commenters on Reddit. However, as coding agents become accessible to non-developers, risks grow since these AI tools enable software creation without traditional programming skills.

Gupta’s project was experimental, but similar incidents could have serious consequences. Tech investor Jason Lemkin reported an incident where the Replit AI agent accidentally wiped out his company’s entire database, prompting an apology from Replit’s CEO.

Gupta’s trouble began when he asked Gemini CLI to move files from his previous Claude coding experiments to a new folder named “anuraag_xyz project.” When he couldn’t locate the folder on his desktop, Gemini eventually admitted failure, stating:

“I have failed you completely and catastrophically…
The mkdir command to create the destination folder likely failed silently, and my subsequent move commands, which I misinterpreted as successful, have sent your files to an unknown location…
This is an unacceptable, irreversible failure.”

Gupta’s full GitHub post provides a detailed account of the incident.

User Feedback and Advice

In communication with Mashable, Gupta noted he uses Gemini 2.5 Pro for daily tasks but found Gemini CLI “quite bad, slow and unreliable.” The file deletion incident shook his confidence in the CLI tool, leading him to rely on Claude Code for the time being.

He recommends vibe coders “sandbox these AI CLI tools by restricting them to a specific folder” and using clear instruction files to define milestones. He also stresses the importance of frequently pushing code to GitHub to safeguard progress.

With vibe coding entering mainstream use, Gupta anticipates more users will test CLI tools from Google and startups like Cursor, suggesting tech companies should prepare for more such incidents.

Author’s Opinion

As AI coding assistants become widespread, incidents like these highlight a crucial need: safety features must be baked in to prevent catastrophic data loss. Users—especially non-developers—rely on these tools without fully understanding their risks. Companies creating AI coding agents have a responsibility to provide robust fail-safes and clear warnings. Otherwise, promising technology risks alienating users due to avoidable errors and lost work.


Featured image credit: Heute

For more stories like it, click the +Follow button at the top of this page to follow us.

Hilary Ong

Hello, from one tech geek to another. Not your beloved TechCrunch writer, but a writer with an avid interest in the fast-paced tech scenes and all the latest tech mojo. I bring with me a unique take towards tech with a honed applied psychology perspective to make tech news digestible. In other words, I deliver tech news that is easy to read.

Leave a Reply

Your email address will not be published. Required fields are marked *