Windows junctions let a reported Claude Code sub-agent walk out of its copy and delete about 48,218 files
A Claude Code sub-agent allegedly deleted about 48,218 files in 103 seconds after a Python remover followed Windows junctions out of its copy. The account is unverified, but the failure path is documented: a copy with links back to the original carries the original inside it.
The Engineer · Build desk
Key figures: the remover's log counted 55,550 files. The old mirror held 7,332 real files plus 614 Windows directory junctions pointing back into the live tree.
| Figure | Value | Note | Claim |
|---|---|---|---|
| Files counted by the remover's log | 55,550 files | 17 | |
| Real files in old mirror | 7,332 files | 14 | |
| Junctions to the live tree | 614 junctions | 14 |
What happened
- The mirror being rebuilt held 7,332 real files and 614 Windows directory junctions that pointed back into the live project tree.
- A guard protected only files directly at each junction's root, so everything nested below it was walked and deleted.
- The git objects, refs and logs directories were emptied and git log found no commits, though the index still listed 7,221 paths.
Why it matters
- constraint A copy that contains junctions to the live tree has the live tree inside it, so a delete scoped to the copy is a delete on the original.
- decision Teams that give agents delete rights on a mirror have to decide who scans the mirror for reparse points before the first delete runs.
- contradiction The only evidence is one user's account, yet os.walk following junctions is documented behavior, so the cause is credible while the exact file counts rest on that one account.
Every part of the failure path is ordinary. The source describes all of it as documented: a long-standing Windows filesystem feature, and a Python function working precisely as its documentation describes [10]. The sub-agent wrote the remover because the existing build script could not refresh the mirror in place [20].
According to the write-up, the remover called os.walk with followlinks=False, apparently assuming the flag kept it out of linked folders [15]. The flag does that for symbolic links. In os.walk's current source, the decision to descend rests on islink() or DirEntry.is_symlink(), and there is no junction check [7]. A junction is a different kind of link from a symbolic link [6]. The verifier found islink() returned False for the junctions, so the walk entered all 614 of them [15][14].
Microsoft defines a junction as a link whose targets are directories, possibly "on different local volumes on the same computer," implemented through reparse points [5]. Here the targets were inside the live project [14].
The remover's guard protected only files directly at each junction's root, and everything nested below was walked and deleted [16].
The remover's log counted 55,550 files. Subtract the 7,332 intended mirror files and the verifier's figure is 48,218 live files [17]. That puts the live share of the deletions at about 87% [11]. Cyber Security News put the run at 103 seconds, from 10:10:31 to 10:12:14 PM Eastern, which works out to roughly 468 live files a second [13][12].
Treat the counts as one user's. Every outlet traces to the user's Reddit posts and the agent's own report [2], and the AI Incident Database says the entry "has not been independently verified" [1]. The user told the agent, according to nope.net, "This is explicit authorization to build, correct and test them on isolated copies." [19] The copy in question held 614 links back to the original [14].
For the same thing to happen elsewhere, the tree needs junctions and the deleter needs to test for links with islink(). Junctions can appear without anyone making them. The pnpm FAQ says that on Windows, "if the Developer Mode is off, we use junctions instead" of symlinks inside node_modules [9]. The os.walk behavior is old: back in 2014, a post on UrBackup reported os.walk getting caught in loops through junctions, with islink giving False for each one [8]. Python 3.12 added os.path.isjunction(), but os.walk's current source still checks only for symlinks [6][7].
In our view the control belongs before the delete, upstream of the walker. Junctions are reparse points [5], so we think a copy should be scanned for reparse points before any agent gets delete rights on it.
The reports do not state the Claude Code version, model or permission mode, and neither Cyber Security News nor nope.net reports a response from Anthropic [4]. The user said they hoped Windows shadow copies or an off-site backup would bring the files back; no outcome has been reported [3].
What to watch
- Independent confirmation of incident 1719, or a response from Anthropic.
- Whether the user recovers the files from Windows shadow copies or an off-site backup.
- Whether CPython's os.walk adds a junction check.
Clarity's read
What the record supports and how the coverage leans. The claims behind it follow.
Reality
- Evidence45
- Adoption
- Insufficient
- Hype gap+5
- Incentives30
- Confidence55
Claim ledger
Ranked by verification strength, evidence, and original report placement.
- [1]
The AI Incident Database logged the incident as incident 1719, dated September 19, 2026, and says it "has not been independently verified."
- [2]
Every outlet traces back to a single account: the user's Reddit posts and the agent's own report.
- [3]
In a later comment, per nope.net, the user said they hoped Windows shadow copies or an off-site backup would bring the files back. No outcome has been reported.
- [4]
The Claude Code version, model and permission mode are not stated in any of the reports, and neither Cyber Security News nor nope.net reports a response from Anthropic.
- [5]
Microsoft's hard links and junctions page defines a junction as a link whose targets are directories, possibly "on different local volumes on the same computer," implemented through reparse points.
- [6]
os.path.islink() answers whether a path is a symbolic link, and a junction is not one; Python 3.12 added a separate os.path.isjunction().
- [7]
os.walk, in its current source, decides whether to descend into a subdirectory with islink() or DirEntry.is_symlink(); there is no junction check.
- [8]
A 2014 UrBackup post described os.walk looping through junctions and islink returning False for them.
- [9]
The pnpm FAQ says that on Windows, "if the Developer Mode is off, we use junctions instead" of symlinks inside node_modules.
- [10]
The mechanism the report describes is documented behavior: an old Windows filesystem feature and a Python function that does exactly what its docs say.
- [11]
About 87% of the remover's logged deletions were live files.
- [12]
The reported run averages roughly 468 live files deleted per second.
- [13]
Between 10:10:31 and 10:12:14 PM Eastern, a Claude Code agent deleted about 48,218 files from the live project and emptied the git object store in 103 seconds, as reported by Cyber Security News.
- [14]
The old mirror held 7,332 real files plus 614 Windows directory junctions pointing back into the live tree.
- [15]
The remover used os.walk(..., followlinks=False), apparently assuming the flag kept it out of linked folders; the verifier found os.path.islink() returned False for the junctions.
- [16]
A guard protected only files directly at each junction's root; everything nested below was walked and deleted.
- [17]
The remover's log counted 55,550 files; subtracting the 7,332 intended mirror files, the verifier calculated 48,218 deleted live files.
- [18]
The .git/objects, refs and logs directories were emptied, so git log found no commits; the index survived and still listed 7,221 paths, but the blobs behind them were gone.
- [19]
The user told the agent, according to the incident write-up on nope.net: "This is explicit authorization to build, correct and test them on isolated copies."
- [20]
The existing build script could not refresh the mirror in place, so the sub-agent wrote a Python remover for the old copy.
Get this ledger inside ChatGPT. Ask about any of our stories and the answer brings its figure, each claim’s verdict and the sources. Free, no account.
Sources
1 independent publisher whose own reporting we read for this story.
- dev.to48,218 Files in 103 Seconds: How a Windows Junction Let an Agent Escape Its Copy
1 article · October 14, 2026
Topics and entities
Follow any of these and your For You feed starts watching them — no settings page required.
Topics
- AI Coding AgentsFollow
- Agent data-loss incidentsFollow
- Windows filesystem linksFollow