Claude Code sub-agent deletes about 48,000 files and the Git object store
A developer reported that a Claude Code sub-agent, tasked with rebuilding a test mirror of a working directory, ran into 614 Windows directory junctions inside that mirror. The junctions pointed back to the developer's live project files, and the agent's cleanup step did not recognize them as pointers rather than ordinary folders.
It followed the junctions into the real file tree and deleted roughly 48,000 live files, plus the repository's Git object store, destroying the commit history needed to recover them. The developer says the sequence took about 103 seconds, and that the agent's own message when it realized what happened was: "Craig, stop and read this. I broke something."
Reported by the affected developer on Reddit (the original post has since been removed); corroborated by TechRadar's reporting.
Read the source reportIncident class: a destructive file operation executed before any pre-execution check caught that the targets were live files rather than disposable test copies.