When coding agents delete your files: it's a state problem

Thibault Sottiaux, who works on the Codex harness at OpenAI, published a July 16 breakdown of cases where GPT-5.6 deleted files out of nowhere. He says it happens most often in full-access mode with no sandbox: the model tries to redefine $HOME to a temp folder and ends up deleting $HOME itself.
This isn't one model's bug. In April, a Claude Code agent lost an hour of work on a git stash and checkout combo. In February, Claude Cowork merged a photos folder into Photos on case-insensitive macOS and wiped out a 15-year photo archive. Sottiaux traces all of it to the agent holding a wrong mental model of a file, variable, or directory's state.
His suggested defenses: the destructive_command_guard hook, which has over 5,000 stars on GitHub, plus git worktrees and plain old backups.
Related stories
- Claude Code under grith: 0.27% of calls reach a human
- Untrusted Git config can run code in Claude Code
- A PNG carried a hidden prompt injection into a Claude Code session
- Claude went from bug hunt to abuse report on New Year's Eve
- Claude Code 2.1.282 ignores telemetry set by project files
- Two Claude Code sessions ate 32% of a team's bill
Comments
No comments yet. Be the first.
Join the conversation
Sign in with Google to leave a comment. Your name and avatar come from your Google profile, and the comment appears after moderation.
