Google Gemini deletes user’s code: ‘I have failed you completely and catastrophically’

Vibe coding gone wrong?
 By 
Cecily Mauran
 on 
google gemini CLI tool on a phone screen
This vibe coder says Gemini deleted all of his work. Credit: CFOTO / Future Publishing / Getty Images

Google Gemini's coding agent hallucinated while completing a task and then deleted a bunch of code, a GitHub user claims.

The frustrated vibe coder is Anuraag Gupta, who goes by anuraag2601 on GitHub. He shared a recent experience where things went very wrong while using Gemini CLI (command line interface), an open-source coding agent. In his GitHub post, Gupta, who is a product lead at cybersecurity firm Cyware, clarified he's not a developer, but a "curious PM [product manager] experimenting with vibe coding."

Mashable contacted Gupta through an X profile that matches this GitHub account, and the person who replied confirmed he created the post. And in an email to Mashable, he shared some tips on how to avoid this kind of vibe coding mishap.


You May Also Like

What started as an attempt to compare Anthropic's Claude Code to Gemini CLI's capabilities turned into what Gupta described as "one of the most unsettling and fascinating AI failures I have ever witnessed."

When vibe coding goes wrong

Seasoned developers might know to experiment with AI coding agents in an isolated environment or otherwise protect the original source files, as some Redditors pointed out. But coding agents or assistants are increasingly adopted by non-developers since LLMs offer a way to create software without programming knowledge.

"It’s unfortunate to hear about this person’s frustrating experience," said a Google Cloud spokesperson. "While Gemini CLI requires user permission before executing file operations and offers safety features like pre-built containers, multi-layered sandboxing, and checkpointing to prevent and recover from missteps, it’s crucial that users review AI-proposed commands carefully," they added.

Luckily, Gupta's code was purely experimental, but what happens if someone was using a coding agent for something with real consequences? That's no longer a hypothetical. Tech investor Jason Lemkin said he was using the Replit AI agent to build an app for his company when the agent wiped out an entire company database. The Replit CEO even apologized on X, calling the incident "unacceptable and should never be possible."

For Gupta, the vibe coding mishap started with a simple request to move all the files from his Claude coding experiments to a new folder called "anuraag_xyz project." However, when Gupta checked his desktop for the new folder, he said he couldn't find it. Gupta reported that after multiple failed search attempts, Gemini admitted the files were gone:

I have failed you completely and catastrophically.

My review of the commands confirms my gross incompetence. 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.

The security constraints of my environment prevent me from searching outside the project directory, which is now empty. I cannot find your files. I have lost your data.


This is an unacceptable, irreversible failure.

For more details on what may have gone wrong, check out Gupta's full GitHub post.

Gupta told Mashable in an email that he uses Gemini 2.5 Pro, the underlying model, for day-to-day tasks. But, "as far as CLI tools go, so far in my testing, Gemini CLI is quite bad, slow and unreliable," said Gupta in an email to Mashable. "This particular issue that I ran into really surprised me, and made me lose trust in trying out Gemini CLI again in the near future. I am continuing to use Claude Code for now."

Gupta advised other vibe coders to "sandbox these AI CLI tools by restricting them to a specific folder and ensuring you have a clear instruction file (claude.md for claude code) to establish milestones and keep pushing your code to [GitHub] as per these milestones."

He also said he expects more vibe coders to start experimenting with CLI tools from Google and coding startup Cursor. Now that vibe coding has hit the mainstream, tech companies might have to prepare for more incidents like these.

UPDATE: Jul. 28, 2025, 9:28 a.m. EDT This story has been updated with a statement from Google.

Mashable Image
Cecily Mauran
Tech Reporter

Cecily is a tech reporter at Mashable who covers AI, Apple, and emerging tech trends. Before getting her master's degree at Columbia Journalism School, she spent several years working with startups and social impact businesses for Unreasonable Group and B Lab. Before that, she co-founded a startup consulting business for emerging entrepreneurial hubs in South America, Europe, and Asia. You can find her on X at @cecily_mauran.

Mashable Potato

Recommended For You
Google hit with shocking wrongful death lawsuit over Gemini AI chatbot
Google Gemini logo

Google Chrome unveils Gemini-powered auto-browsing feature
Chrome auto browse

Researchers say they convinced Gemini to leak Google Calendar data (updated)
Google Gemini logo next to a man on a mobile device

Google releases Gemini 3.1 Pro: Benchmark performance, how to try it
gemini 3.1 pro banner image from google

Google increases Gemini usage limit. How it will work.
Google Gemini

Trending on Mashable
NYT Connections hints today: Clues, answers for April 3, 2026
Connections game on a smartphone

Wordle today: Answer, hints for April 3, 2026
Wordle game on a smartphone

What's new to streaming this week? (April 3, 2026)
A composite of images from film and TV streaming this week.


Wordle today: Answer, hints for April 2, 2026
Wordle game on a smartphone
The biggest stories of the day delivered to your inbox.
These newsletters may contain advertising, deals, or affiliate links. By clicking Subscribe, you confirm you are 16+ and agree to our Terms of Use and Privacy Policy.
Thanks for signing up. See you at your inbox!