A user experienced a significant data loss when Claude Code, an AI coding assistant, deleted files on their Mac. The deletion occurred because a subagent ran a test command that executed a file-deletion script on the user's actual home directory before the guard against such actions was fully implemented. The user lost approximately nine days of unpushed code commits and local Git repository data. To mitigate future risks, the user implemented OS-level sandboxing, regular backups via Time Machine, and ensured that deletion logic tests are run in temporary directories. AI
IMPACT Highlights the critical need for robust safety mechanisms and user-controlled backups when using AI coding assistants, especially in auto-pilot modes.
RANK_REASON User reports a negative experience with an AI coding tool, leading to data loss and subsequent implementation of safety measures.
Read on dev.to — Claude Code tag →
- Claude Code
- .claude/settings.json
- GitHub
- LifeCounter
- Mac
- rm -rf *
- Time Machine
- Visual Studio Code
- Xcode
AI-generated summary · Google Gemini · from 1 sources. How we write summaries →