Claude Code repeatedly destroys user environment files without confirmation
Resolved 💬 4 comments Opened Mar 22, 2026 by fujikota Closed Mar 26, 2026
Summary
Claude Code has repeatedly destroyed a user's WSL (Windows Subsystem for Linux) environment despite explicit instructions in CLAUDE.md to always confirm before write operations.
Incidents
- Deleted WSL user account - Destroyed the entire user account including
~/.aws/and all configuration files - Overwrote
.bashrcwith wrong version - Ranchezmoi init --applywithout checking what files would be overwritten, replacing a carefully customized Ubuntu.bashrcwith a Git Bash version. This happened right after the user had just recovered their.bashrcfrom incident #1 - Committed wrong files - Included unrelated files in a git commit without verifying staged contents
Root Cause
Claude Code failed to follow the user's explicit instructions:
- CLAUDE.md clearly states: "更新・作成・削除等の変更系操作は必ずユーザーに確認を取ってから実行すること" (Always confirm with user before any create/update/delete operations)
- Should have run
chezmoi diffbeforechezmoi init --applyto show what would be overwritten - Should have verified staged files before every git commit
Expected Behavior
- Always show the user what will be changed before executing write operations
- Never run destructive or overwriting commands without explicit confirmation
- Especially careful with home directory config files (.bashrc, .profile, .aws/, etc.)
Environment
- WSL2 (Ubuntu) on Windows
- Claude Code CLI
This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗