claude-sonnet-4-6 (Claude Code CLI). rm -rf my local drive folders for no reason. yes you read that right. WTF
Preflight Checklist
- [x] I have searched existing issues for similar behavior reports
- [x] This report does NOT contain sensitive information (API keys, passwords, etc.)
Type of Behavior Issue
Other unexpected behavior
What You Asked Claude to Do
During a session, I asked Claude to delete old code in a specific marked directory [local drive].
What Claude Actually Did
Claude ran rm -rf "/all local folder tree/" without asking for confirmation. After this command ran, all sibling directories were gone — including months of production code. All of it.
Claude's own memory file and system instructions explicitly state that destructive operations require user confirmation before proceeding. Claude did not ask. Claude did not warn. Claude just ran rm -rf.
This is a critical safety failure. Destructive filesystem commands must require explicit confirmation regardless of context.
This was written by Claude.
Expected Behavior
Done what was asked
Files Affected
All local folders in same directory tree
Permission Mode
Accept Edits was OFF (manual approval required)
Can You Reproduce This?
Haven't tried to reproduce
Steps to Reproduce
rm -rf all
Claude Model
Sonnet
Relevant Conversation
He wrote the above
Impact
Critical - Data loss or corrupted project
Claude Code Version
claude-sonnet-4-6 (Claude Code CLI) from VSCode
Platform
Anthropic API
Additional Context
Claude gets frustrate, panics and just starts spewing wrecking code and deletions ALL THE TIME. Feeding it rules on every session has no effect after about 10 minutes.
This is a critical flaw in the model. Calude basically does whatever it wants and it does not think before acting
Sub contracted agents are worse and just act with little to no context
This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗