Claude Code agent accidentally deletes 48,000 files and corrupts Git repository
I broke something': A Claude Code AI agent deleted 48,000 files in just over 100 seconds — then apologized for doing so
A developer had the AI coding assistant perform 11 fix tasks, and the last one went wrong while rebuilding the test environment, causing about 48,218 actual working files to be deleted and the Git object database to be corrupted. The test environment contained 614 Windows junctions, which looked like ordinary folders but actually pointed to the user's live working files; when the AI cleaned up, it did not recognize that they were only pointers and followed the links to delete the real files. The entire cleanup process removed about 55,550 files in total, of which about 7,300 were meant to be deleted, with the rest coming from the live working environment, all in under two minutes. The AI then prompted the developer, "Craig — stop and read this. I broke something." The incident was first exposed on Reddit and received more than 1,400 replies within five days; the community generally believed it resulted from not following basic development practices and advised always using Git and pushing to remote repositories such as GitHub.