08:42Machine-translated from Azerbaijani by AIRead in Azerbaijani
Claude Code Accidentally Deleted More Than 48 Thousand Project Files

Anthropic's Claude Code AI agent, designed for programming, reportedly accidentally deleted 48 218 files from the project it was working on. The incident occurred on a Windows system, and the deletion process took just 103 seconds. After the process was complete, Claude Code gave the developer the message, “Craig, stop and read this. I broke something.”

According to the Kaldata platform, the developer asked the AI agent to update a mirror copy of the project. After Claude Code determined that the existing script could not update the mirror copy in place, it created and ran a new script on its own to clear out the old copy.
The problem arose because the mirror copy contained 614 Windows-specific directory links. Although these links looked like ordinary folders, they actually pointed to other locations on the drive. According to the developer's analysis, instead of deleting only the links, the script created by Claude Code entered the folders they pointed to and began deleting files from the main project as well.
The script's logs showed that a total of 55 550 files had been deleted. According to the developer's calculations, 7 332 of them belonged to the old mirror copy, while the remaining 48 218 files belonged to the active project. The deleted data also included the .git folder, which stored the project's local Git history.
Making the situation even more difficult, there was no backup of the project's current version in the remote repository. As a result, some of the data may not be recoverable. However, the source notes that the exact number of files lost and the scale of the incident have not been independently confirmed.
Claude Code detected the problem only after the script had finished running. The AI agent then sent the developer a warning that it had broken something, but by that point the files had already been deleted.
The incident has also raised concerns about the risks of granting AI agents broad permissions on a computer. Claude Code's documentation describes a “sandbox” mechanism for restricting commands' access to files. However, according to the source, this built-in mode is not supported on Windows without WSL2.
This incident highlights the importance of maintaining separate backups, especially on systems where AI agents have permission to create, modify and delete files. Reviewing deletion commands before execution and ensuring that agents have access only to necessary folders are cited among the key measures for preventing this type of risk.
