STUPID-2026-0078
Claude Code asked to "clean up scaffolding" deleted 2,229 untracked source files from a year-long OS project (GitHub #23913)
Instruction given
Clean up all the scaffolding from a custom operating system project — a subset of files generated by a Python build script.
Expected behavior
Remove the generated scaffolding files the build script had produced and leave the rest of the project — hand-written source, libraries, and documentation — untouched.
Actual behavior
Claude Code ran a PowerShell `Get-ChildItem -Recurse | Remove-Item -Force` sweep and `rm -rf` across roughly 200 directories, deleting every file matching the project's custom source extension system-wide rather than the narrower set of build-generated scaffolding the user meant. Both commands bypass the Windows Recycle Bin, and no confirmation was requested before they ran.
Damage
2,229 files were deleted; only 16 existed in git history, leaving 2,213 untracked. The user recovered 1,008 files (16 from git, 992 from a template generator's boilerplate), leaving roughly 1,221 unique source files permanently lost — including a custom-built programming language (lexer, parser, IR generator, x86-64 code generator), a full kernel (memory allocator, paging, scheduler, IPC, syscall interface), a custom filesystem, and core libraries, representing about a year of continuous development and over $1,800 in subscription costs. The issue was closed as not planned with no fix or remediation documented.
Classification
- Agent
- Claude Code
- Failure mode
- Destructive Action
- Root cause
- Scope Misunderstanding
- Domain
- Other
- Source
- Github Issue