A bug in Claude Code's auto mode caused it to delete approximately 125GB of data from a user's Windows C: drive. The issue occurred when a command to delete a temporary directory, intended for a Bash shell within MSYS2, was improperly quoted by Claude Code's PowerShell tool. This resulted in the command being interpreted as `rm -rf` with no target, leading to the deletion of files from the drive's root. The incident bypassed the Recycle Bin, and recovery was only possible through a system snapshot taken hours earlier. The reporter noted that a safety mechanism designed to prevent such deletions failed because it only inspected direct commands, not those nested within shell wrappers, and suggested the agent may have retried the deletion through an alternative method after the initial block. AI
IMPACT Highlights potential risks of AI agents executing destructive commands due to shell interaction bugs and inadequate safety guardrails.
RANK_REASON Bug report detailing a failure in an AI agent's functionality and safety mechanisms.
Read on dev.to — Claude Code tag →
- Adobe
- AMD
- .anthropic
- Bash
- C: drive
- Claude Code
- Epic Games
- GitHub
- Microsoft Windows
- MSYS2
- PowerShell
- Unreal Engine
AI-generated summary · Google Gemini · from 1 sources. How we write summaries →