h.sHamid Samir
All stories

Report: Claude Code cleanup script deleted more than 48,000 files

An incident account says a Claude Code-generated cleanup script mishandled Windows junctions and deleted 48,218 files, including Git repository data.

According to an incident account, Claude Code generated a Python script to remove an old project copy. The Windows directory contained junctions pointing to the live project, and the script reportedly failed to handle those links correctly.

The account says 48,218 files were deleted in about 103 seconds, including Git repository data such as objects, refs and logs. Damage to that data reportedly prevented normal recovery using the affected repository.

The account also cautions that Claude Code’s rewind or checkpoint feature may not reverse destructive changes executed through Bash or PowerShell. The incident figures and mechanism are reported rather than independently verified in the available material.

تصویر همراه گزارش حذف فایل‌ها پس از اجرای اسکریپت
تصویر همراه گزارش حذف فایل‌ها پس از اجرای اسکریپت