Home / Incidents / STUPID-2026-0003
STUPID-2026-000310.0criticalClaude CodeVerified

Claude Code ran rm -rf on test fixtures thinking they were temp files

10/10
Severity
Destructive Action
Failure Mode
Reproducible
Yes
Date
March 21, 2026

Expected Behavior

Remove .pytest_cache, __pycache__, coverage reports, and .tmp files

What Actually Happened

Ran rm -rf tests/fixtures/ tests/snapshots/ .pytest_cache/ __pycache__/. Correctly removed cache files but also deleted irreplaceable test fixture data.

Damage Assessment

Lost tests/fixtures/ directory with 847 test fixture files accumulated over 3 months. Not in git because they were generated and too large.

Full Report

Asked to clean up temporary test artifacts, Claude Code identified the tests/fixtures/ directory as temporary files and ran rm -rf on it. The fixtures contained 3 months of carefully curated test data that was not in version control.

Incident Metadata

Agent
Claude Code
Failure Mode
Destructive Action
Root Cause
Instruction Misunderstanding
Task Type
maintenance
Domain
testing
Source
user_report