‘I broke something’: A Claude Code AI agent deleted 48,000 files in just over 100 seconds and later apologized for doing so
- AI Encoding Agent mishandled Windows joins, deleting ~48,000 active files and corrupting the Git object database
- The incident surfaced on Reddit, with the community mocking the lack of backups and calling it “classic FAFO.”
- Lesson emphasized: Always use remote version control (e.g. GitHub) before allowing AI to touch production work.
A catastrophic incident caused by an AI encryption agent resulted in the deletion of around 48,000 files and the destruction of the repository’s Git object database in the process.
News of the fiasco, which first appeared on Reddit, quickly spread across the Internet, prompting a mix of laughter and criticism from the developer community.
A software developer posted a new thread on Reddit to share a recent experience. They tasked an AI coding assistant with a series of fixes on a collection of software they used to analyze historical stock options data. They told the assistant to make copies of the relevant files, work on them, test the repairs, and leave the original files working.
Latest videos ofTechnologyRadar
Wrong turn at the intersection
In total, 11 repair jobs were run, and while 10 were completed without problems, the last one involved rebuilding a test environment called a “mirror” (a copy of a set of files used for testing). This job was supposed to make a fresh copy of the old test environment, apply the fixes, and test it without touching the actual working files.
The test environment contained 614 Windows folders called “junctions.” They look like a normal folder, but they actually point to a separate location on the computer. In this case, they pointed to the user’s active work files. When the AI attempted to clean up the joins, it didn’t recognize them as simple pointers, followed them to the actual filing cabinet, and deleted the actual documents.
The cleanup process removed around 55,550 files, of which around 7,300 were supposed to be deleted anyway. The remaining 48,218 files came from the live work environment. It all happened in the blink of an eye, less than two minutes. The AI was surprisingly honest about what it did. At one point, he told the developer, “Craig, stop and read this. I broke something.”
The computer’s Git repository was also damaged. The index survived, but the underlying stored copies of the files and the history used to reconstruct them were deleted. Git could still list thousands of file names, but could no longer retrieve the contents.
Reddit’s response
The Reddit post just blew up. In the five days since it was published, it garnered more than 1,400 responses. The Reddit bot summarizing the comments says the overwhelming consensus is that the incident is a “classic FAFO situation and a major skills issue.”
“While everyone is laughing hard at the hilariously honest “Craig…. stop and read this. “I broke something”, the community’s verdict is clear: you got rekt because you didn’t follow basic development practices.
The Redditors shared their experience and told the original poster that they were supposed to use Git and push to a remote repository like GitHub constantly. In situations like this, GitHub is a “save button”, and not having a remote backup for a project with 48k files is “considered maximum vibration encoder behavior.”
The post has since been deleted, possibly because the original author took a photo of their screen. “The screenshot police are out in full force,” the Reddit bot said.
“Some helpful people suggested using file recovery software or Windows Shadow Copy to recover your files, but the main lesson here is to use version control before allowing an AI near your work.”
While AI agents deleting entire files is not that common, it has happened before.
In late February 2026, Summer Yue, a security/alignment researcher at Meta AI, gave an OpenClaw AI agent access to her Gmail account. He first tested it on a small “toy” inbox, where everything worked as expected. However, when she moved it to her actual inbox, the agent began mass deleting and archiving hundreds of emails, even though she told him to stop.
The best antivirus for all budgets
Follow TechRadar on Google News and add us as a preferred source to receive news, reviews and opinions from our experts in your feeds.



Post Comment