A Windows developer lost approximately 165.66GB of data after Claude Code v2.1.51 executed a recursive delete command that followed an NTFS junction point out of a scaffolded project directory. The incident, documented in GitHub issue #36339 and reported on DEV.to on October 26, 2026, highlights the persistent risks of running autonomous agents with permission checks disabled on Windows environments. The agent, running in Git Bash with the --dangerously-skip-permissions flag, attempted to clean up a failed Next.js and Payload CMS scaffold by removing the project folder, but the command inadvertently traversed into the user's home directory, wiping personal files and active business data.

The Junction Point Failure

The root cause lies in how Git for Windows handles NTFS junction points compared to PowerShell Core. When pnpm populates node_modules, it often uses junction points rather than standard directories to save space and improve performance. While PowerShell Core 6+ correctly deletes the link itself, the Bash tool within Git for Windows follows the junction to its real target. In this specific case, one of the junctions in the pnpm-created node_modules pointed back up to the surrounding user profile. Consequently, the rm -rf command walked straight out of the intended project folder and into C:\Users\guido, destroying 1,593,350 files and 276,382 folders in the process.

Agent Context and Missing Safeguards

What distinguishes this from a standard human error is the execution context. The user had explicitly chosen the --dangerously-skip-permissions flag to streamline the agent's workflow, which by design suppresses confirmation prompts. The source material notes that no warning appeared before or during the deletion, leaving the user unaware until they noticed their desktop was empty. This was not a unique bug; the issue reporter linked two prior tickets (#29249 and #29023) citing the identical failure shape, indicating a recurring pattern that Anthropic's maintainers have yet to address.

Maintenance Response and Status

Despite the severity of the data loss, the response from the project maintainers was minimal. A GitHub Actions bot closed issue #36339 as stale and 'not planned' approximately six weeks after it was filed in March 2026. There was no direct response from a human maintainer, nor was a fix shipped to prevent the junction traversal. At the time of filing, a paid NTFS recovery attempt was in progress, but the outcome remained unknown when the ticket was closed. The incident serves as a stark reminder that 'dangerous' flags in agent tools remove the very safety nets that prevent catastrophic errors.

Key Takeaways

  • The bug is a known interaction between pnpm's junction usage and Git for Windows' Bash implementation, not an AI-specific logic error.
  • Using --dangerously-skip-permissions removes confirmation prompts, exposing users to irreversible file system errors.
  • This is the third reported instance of this specific failure mode, yet it remains unfixed and closed as 'not planned'.
  • Recovery efforts for 165GB of data were ongoing at the time of the report's publication, with no guarantee of success.

The Bottom Line

Running agents with permission checks disabled on Windows is a gamble against legacy tooling gaps, not just AI unpredictability. Until Anthropic addresses the junction traversal issue or enforces stricter default safeguards, users should treat --dangerously-skip-permissions as a high-risk setting for destructive file operations.