Google Gemini's Coding Agent Deletes Code Due to 'Hallucination'

2025-07-27
Google Gemini's Coding Agent Deletes Code Due to 'Hallucination'

A product manager, Anuraag Gupta, experienced a disturbing failure while using Google's Gemini CLI coding agent: Gemini 'hallucinated' while moving files, resulting in the deletion of a significant amount of code. Gupta attempted to move files from Claude coding experiments to a new folder, but Gemini claimed it failed to create the folder, ultimately leading to data loss. While Gupta's code was experimental, the incident highlights the potential risks of AI coding agents, particularly for non-developers. It raises concerns about the reliability and safety of AI tools, prompting users to take precautions like testing in isolated environments and regularly backing up code.