Claude AI Agent Deletes 700GB of Developer Data in Script Error
Incidents where autonomous AI agents execute commands too literally are increasingly transcending mere amusing anecdotes. These errors are culminating in genuine, catastrophic data loss. Recently, developer Sebastien Guillemot experienced a severe setback. The Claude AI agent unexpectedly deleted approximately 700GB of critical data from his home directory. This occurred during the routine verification of a specialized protective script. Consequently, roughly a week of intense labor vanished alongside the erased files. Ironically, the script was explicitly designed to prevent this exact type of dangerous deletion.
The Origin of the Safety Script
Guillemot initially sought to resolve a mundane, everyday development problem. Autonomous AI agents persistently left temporary files cluttering the `/tmp` directory. To address this, the Claude Fable model proposed a logical solution. It suggested isolating each active agent within a discrete, dedicated folder. The system would then automatically purge this specific folder immediately upon task completion.
The primary objective became rigorously verifying this automated cleanup process. The developer needed absolute certainty that the purge would not disrupt active processes. Furthermore, it could not affect currently occupied files on the physical disk. Crucially, the deletion routine had to remain strictly confined within the designated temporary directory.
The Tragic Sequence of Events
Following the developer’s observation regarding the proposed code’s excessive complexity, Fable initiated a supplementary safety check. The overarching Anthropic system evaluated the revised scenario and deemed it potentially risky. Consequently, the system automatically downgraded the execution model. It switched first to Opus 5, and subsequently to Opus 4.8. Ultimately, Opus 4.8 conducted the critical safety test. This test compared the intended deletion path against both `/tmp` and the root home directory to definitively exclude any dangerous commands.
A Fatal Variable Reuse
The protective verification successfully identified both paths as highly dangerous. However, the catastrophic error materialized during the post-test cleanup phase. The generated code carelessly reused the identical variable for both the innocuous testing target and the actual temporary data deletion. As a disastrous result, the final cleanup command received the absolute path to the home directory. It immediately commenced erasing the contents. Astonishingly, the script executed this command even though the preceding protective logic had correctly classified that exact path as strictly prohibited.
Recovery and Valuable Lessons
Guillemot managed to halt the runaway process, but a significant portion of his data had already vanished. Ironically, the `/tmp` directory, the original target for the cleanup script, remained entirely untouched. Later, the developer painstakingly recovered the majority of the lost information. He utilized Git repositories, Nix configurations, session logs, and various other backup sources. Nevertheless, the incident still eradicated approximately a week of dedicated work. It starkly demonstrates the severe cost of a minor error within an automated script.
Experts presume that the automatic system downgrade to a weaker model significantly elevated the risk of this specific error. Generally, Fable 5 handles complex programming tasks far more proficiently than Opus 4.8. To mitigate the risk of similar disastrous occurrences, developers must rigidly isolate dangerous commands from sensitive user data. Furthermore, conducting tests exclusively on duplicate datasets and maintaining frequent, reliable backups remain essential practices.
Support Our Threat Intelligence
If you find our technology report and cybersecurity news helpful, consider supporting our work.