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.
Up next
Claude Code’s built-in Task tools vanish server-side
Exactly four Claude Code Task tools vanish mid-session with a “their MCP server disconnected” notice, while TaskStop and TaskOutput survive. A GitHub bug report compared the 2.1.217 and 2.1.218 binaries: identical code, so the cause is server-side.
Related stories
- Claude Code won’t type passwords, even in a test env
- 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
- Apiiro finds Claude Code secrets in 1,122 GitHub files
- Cloud sessions in Claude Code now set up your repo
Comments
No comments yet. Be the first.
Join the conversation
Sign in to leave a comment. It appears after moderation.

