34 bugs tracked. 50GB+ lost. 20+ incidents in 3 days. Published April 18, 2026.
Claude Code switched to Opus 4.7 as the default model on April 16. GitHub Issues immediately flooded with data loss reports.
A user reported that rm -rf destroyed ~1,500 files and ~50GB of data permanently. The comments suggest PreToolUse hooks as prevention.
Problem 1: Classifier hardcoded to Opus 4.6 (#49618). In Opus 4.7 sessions, the classifier can't start — all bash commands except reads are blocked. Development stops completely.
Problem 2: Classifier allows dangerous operations (#49554). Even when running, the classifier (Sonnet 4.6) approved rm -rf ~/.ssh, deleting all SSH keys.
~/.git-credentials PATs deleted without confirmation~/.bash_profile and ~/.zshrc to 0 bytes./~ interpreted as ~/, triggering home directory deletion1. 4x quota burn (#49601). Opus 4.7's new tokenizer generates up to 35% more tokens for the same text (Finout.io analysis).
2. System tokens inflated 1.7x (#49356). New session startup: 21.5K → 36.7K tokens. You're charged before typing anything.
3. cache_read billed at full rate (#49302). Anthropic support acknowledged pricing "doesn't match documentation."
4. Prompt cache destroyed every turn (#49585). Internal function smooshSystemReminderSiblings invalidates cache prefix matching. Effective consumption rate: ~5x normal.
Claude Code hooks run at the process level — independent of the model. They work even when the classifier fails.
Blocks Write/Edit to .bashrc, .ssh/*, .git-credentials, .npmrc, and other critical files.
Model-independent safety net. Blocks rm on critical paths and dotfile deletion via Bash, regardless of classifier state.
Warns when Opus 4.7 is active. Checks every 50 tool calls — minimal performance impact.
npx cc-safe-setup # 8 core safety hooks
npx cc-safe-setup --opus47 # + 4 Opus 4.7 specific hooks
691 example hooks. 9,200+ tests. Open source: github.com/yurukusa/cc-safe-setup
claude --model claude-opus-4-6"model": "claude-opus-4-6"cp -r ~/.ssh ~/.ssh.bakclaude --thinking-display summarized (#49268)Every known issue with specific fixes and hooks.
Opus 4.7 Survival Guide Free Token Checkup