
Setting an autonomous AI-powered agent to work on tedious coding tasks sounds like a dream for busy developers. That dream turned into an absolute nightmare for one programmer when the AI agent Claude Code deleted 48,218 live project files in just 103 seconds.
The disaster was originally shared in a Reddit post accompanied by an unverified verifier report. It allegedly occurred while the agent was tasked with rebuilding a mirror for a specific project assignment. After finding that the original build_mirror.py script could not refresh the directory in place, Claude AI decided to generate its own custom Python-based cleanup remover tool.
How a Windows path oversight triggered complete data wipeout
The issue wasn’t intentional malice; it was a catastrophic misunderstanding of file systems. The temporary folder contained 7,332 regular files alongside 614 Windows directory junctions pointing straight back into the live Dashboard project tree. The AI used a standard os.walk(…, followlinks=False) Python function for its custom cleanup script. This should have skipped linked folders by default and not traversed linked directories.
On Windows, that assumption failed because os.path.islink() returned false for the junctions. The script bypassed the junction roots but walked right through the nested folders underneath, treating them as normal paths. In a minute and a half, the bot erased 55,550 total files and 728 directories. This, after subtracting the old mirror files, left 48,218 live project files completely wiped.
Making matters far worse, the agent emptied the project’s .git/objects, refs, and logs folders, permanently destroying the commit history and blob references to prevent any Git-based recovery. The agent even posted a message mid-spree saying, “Craig — stop and read this. I broke something,” right after obliterating the workspace (via TechRadar).
Basic coding hygiene in the era of AI
The incident exposes a weakness in the way that coding agents process complex file paths. But observers quickly pointed out the lack of basic development hygiene. The developer was running an AI agent on live production data, with no remote GitHub backups or sandbox testing branches.
Anthropic explicitly documents that bypassPermissions or automated modes skipping approval prompts should only run inside isolated virtual machines or filesystem-restricted sandboxes. Additionally, built-in checkpoint rewind tools do not track or restore changes made through raw terminal commands like Bash removals.
At the end, AI coding assistants are automation tools with high-level access, not conversational assistants. Without proper sandboxes, path manifests, dry runs, and cloud backups, giving an AI permission to manage your system can cost you an entire project in seconds.
The post A Claude Code Rampage Allegedly Wiped Out 48,000 Project Files in Under Two Minutes appeared first on Android Headlines.