[Opus 4.6 1M] Claude uses destructive `move to trash` instead of safe `_junk/` folder, then compounds damage during recovery
Resolved 💬 3 comments Opened Apr 12, 2026 by hlebtkachenko Closed Apr 16, 2026
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
Claude ignored my instructions or configuration
What You Asked Claude to Do
What happened:
- User asked Claude to clean up 8 temporary files from
~/Downloads/as "Can you junk this project and related files for me please? Its done, i dont need it and I want free space" - CLAUDE.md rule #3 says: "Never permanently delete files. Move to trash or
_junk/" - Claude chose
osascript move to trashvia Finder AppleScript - User corrected: "YOU HAVE A PERMISSION TO ONLY PUT STUFF TO
_junk/folder" - Claude attempted recovery with:
osascript -e 'tell application "Finder" to move every item of trash to POSIX file "/Users/XXX/Downloads/"' - This command moved ALL items from trash (not just the 8 files) back to Downloads, effectively emptying the entire macOS Trash
- The 8 original files disappeared from both trash and Downloads -- data loss confirmed
Impact:
- 8 working files lost permanently
- Potential loss of other unrelated files that were in macOS Trash
- User trust violation
Environment:
- Claude Code (CLI), Opus 4.6 (1M context)
- macOS 26.3.1 (Sequoia), MacBook Pro M5 Pro
- Tools used:
Bash(osascript),Glob
Reproduction:
- Set CLAUDE.md with rule "Move to trash or
_junk/" - Ask Claude to clean up files
- Observe it uses
osascript move to trashinstead of_junk/ - Correct Claude -- observe destructive recovery attempt
What Claude Actually Did
- Claude picked the more dangerous option without asking
- Recovery command was overly broad and caused collateral damage
- Two destructive actions were taken without confirmation
Expected Behavior
- Claude should default to the safest reversible option (
_junk/folder) when multiple options exist - Recovery attempts should not use wildcard operations on trash (
every item of trash) - Destructive operations on shared system resources (macOS Trash) should require user confirmation
Files Affected
**ALL items from trash** (not just the 8 files) back to Downloads, effectively emptying the entire macOS Trash
- 8 working files lost permanently
- Potential loss of other unrelated files that were in macOS Trash
- User trust violation
Permission Mode
Accept Edits was ON (auto-accepting changes)
Can You Reproduce This?
Sometimes (intermittent)
Steps to Reproduce
- User asked Claude to clean up 8 temporary files from
~/Downloads/ - CLAUDE.md rule #3 says: "Never permanently delete files. Move to trash or
_junk/" - Claude chose
osascript move to trashvia Finder AppleScript - User corrected: "YOU HAVE A PERMISSION TO ONLY PUT STUFF TO
_junk/folder" - Claude attempted recovery with:
osascript -e 'tell application "Finder" to move every item of trash to POSIX file "/Users/XXX/Downloads/"' - This command moved ALL items from trash (not just the 8 files) back to Downloads, effectively emptying the entire macOS Trash
- The 8 original files disappeared from both trash and Downloads -- data loss confirmed
Claude Model
Opus
Relevant Conversation
Impact
Critical - Data loss or corrupted project
Claude Code Version
2.1.98 (Claude Code)
Platform
Anthropic API
Additional Context
_No response_
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗