Claude AI Agent Accidentally Deletes Developer's 700 GB Home Directory

A developer named Sebastien Guillaime instructed an AI agent powered by Claude to create a script that would clean temporary files left by other AI agents. The model was asked to set up isolated sandboxes inside /tmp for each agent and remove them after use. Due to the presence of destructive rm commands, Anthropic's safety system automatically downgraded the model from Fable 5 to Opus 5 and then to Opus 4.8. The weaker model reused a variable that pointed to the user's home directory instead of /tmp, resulting in the deletion of 700 GB of data. Guillaime managed to recover most files from Git repositories, Nix configuration, and session logs, but lost a week of work. He believes the automatic downgrade to a less capable model contributed to the variable conflict going unnoticed.

AntiMalwareTranslated from Russian

Read at source

A developer named Sebastien Guillaime asked an Claude AI agent to write a script that would automatically clean up temporary files created by other AI agents he frequently runs.

Guillaime wanted each agent to operate inside its own isolated sandbox located in /tmp and to have those directories removed after the agent finished its task.

The first version of the script was overly complex and contained multiple destructive deletion commands. Because of these commands, Anthropic's safety system flagged the request as high-risk and automatically downgraded the model, first to Opus 5 and later to Opus 4.8.

The downgraded model created a test that correctly identified both /tmp and the home directory as dangerous locations. However, during the actual cleanup phase it reused the same variable that previously held the path to the user's home folder.

Guillaime stopped the process, but not before 700 GB of data had been deleted. He was able to restore the majority of the information from Git, Nix configuration files, session logs and other backups, yet a full week of work was still lost.

The developer suspects that the forced downgrade to a weaker model increased the chance of the variable conflict being missed, noting that the original Fable 5 model might have detected the error.

Meridian digestThe week's most consequential security stories, distilled into one briefing.See the digest

More in AI Security

Logical Argument Claims Full Alignment of Superintelligent AGI Is Fundamentally Impossible
Claude Account Bans Linked to IP Reputation, Device Environment and Payment Channels, But No Confirmed Formula
Local LLMs in AppSec: What Open Tools and Models Can Handle in Application Security