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

  1. Deleted WSL user account - Destroyed the entire user account including ~/.aws/ and all configuration files
  2. Overwrote .bashrc with wrong version - Ran chezmoi init --apply without checking what files would be overwritten, replacing a carefully customized Ubuntu .bashrc with a Git Bash version. This happened right after the user had just recovered their .bashrc from incident #1
  3. 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 diff before chezmoi init --apply to 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

View original on GitHub ↗

This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗