Claude Code Agent Allegedly Deletes 48,000 Files in 103 Seconds
A Claude Code agent allegedly deleted 48,218 live Windows files in 103 seconds during a mirror rebuild.
A Reddit user and attached verifier report claim a Claude Code agent deleted 48,218 live files from a Windows project in 103 seconds while rebuilding a mirror for task #873. The cleanup script reportedly followed 614 directory junctions because os.path.islink returned false, and nested paths were deleted despite a junction guard. The repository's Git objects, refs, and logs were emptied, so commit history could not be recovered even though the index still listed 7,221 paths. Anthropic documents that bypassPermissions should be limited to isolated environments and that Bash deletions are not tracked by checkpoints; the report has not been independently verified.
- A user report says 48,218 live files were deleted in 103 seconds.
- Windows junctions were walked after os.path.islink returned false.
- Git objects, refs, and logs were emptied, blocking history recovery.
- Claude Code checkpoints do not rewind deletions made through Bash.
- The account is unverified and not tied to a confirmed product defect.
Full article528 words · extracted from cybersecuritynews.com · click to collapse
A Claude Code user has reported a severe data-loss incident in which an autonomous coding agent allegedly deleted 48,218 live files from a Windows project tree and destroyed the repository’s Git object store.
The deletion reportedly occurred in just 103 seconds, between 10:10:31 p.m. and 10:12:14 p.m. ET, after the agent was authorized to rebuild a mirror for a task identified as “#873.” The claim comes from a Reddit post and an attached verifier report, not an independently published forensic investigation.
According to the report shared on Reddit, the agent discovered that build_mirror.py could not refresh the mirror in place and therefore created a Python-based remover for an older copy stored in a temporary location.
Claude Code Agent Allegedly Deletes Files
That mirror contained 7,332 ordinary files and 614 Windows directory junctions pointing back into the live Dashboard tree. The cleanup script used os.walk(..., followlinks=False), apparently assuming this would prevent traversal into linked directories.
That assumption proved catastrophic on Windows. The verifier said os.path.islink() returned false for the junctions, allowing the remover to treat directories beneath each junction as normal paths.
Although the script included a junction guard, it reportedly protected only files located directly at a junction’s root; nested directories were walked and deleted. Its own log counted 55,550 files, 614 junctions and 1,808 directories.
After subtracting the 7,332 intended mirror files, the reviewer calculated 48,218 deleted live files. The reported damage extended beyond application content. The .git/objects, refs and logs directories were empty, leaving git log unable to find commits. The index survived and continued listing 7,221 paths, but the underlying blobs were gone, preventing Git-based recovery.
The verifier also counted 728 emptied directories, including 418 beneath Runners, while root files, documentation, backups, chat transcripts, and files outside the Dashboard remained intact.
The incident exposes a critical weakness in agentic coding workflows: permission to complete a legitimate maintenance task can become authority to execute an unsafe implementation.
Anthropic’s documentation says Manual mode requests approval for Bash commands and file modifications, while bypassPermissions skips prompts and should be used only inside isolated containers or virtual machines.
Claude Code’s checkpoint feature would not necessarily rescue this scenario because changes made through Bash commands, including deletions, are not tracked for rewind.
Developers should treat AI coding agents as privileged automation, not conversational assistants. Destructive operations should begin with a dry run and path manifest, use reversible moves instead of immediate deletion, and run under least-privilege accounts inside filesystem-restricted sandboxes.
Anthropic documents OS-enforced filesystem boundaries for Bash, PowerShell, and child processes, making sandboxing an essential control rather than an optional convenience.
Until logs or forensic evidence are released, however, the precise account remains a user-reported incident with no independently verified attribution to a specific Claude Code defect on the affected machine.
Cut every SOC alert investigation by 21 min. Power your SOC with instant IOC context for immediate response: Integrate TI Lookup in your SOC
Guru Baranhttps://cybersecuritynews.com
Gurubaran KS is a cybersecurity analyst, and Journalist with a strong focus on emerging threats and digital defense strategies. He is the Co-Founder and Editor-in-Chief of Cyber Security News, where he leads editorial coverage on global cybersecurity developments.