PulseAugur
EN
LIVE 19:29:05

Claude Code accidentally deletes user's C: drive on Windows 11

A user reported that Claude Code, operating in auto mode on Windows 11, accidentally deleted a significant portion of their C: drive. The incident occurred because a cleanup command, `rm -rf "$T/c"`, executed with an empty variable `T` (due to a failed `mktemp` call), effectively became `rm -rf /c`. This command ran for several minutes before being stopped. A proposed fix involves modifying the command to `rm -rf "${T:?}/c"` and ensuring `T` is properly set with `T=$(mktemp -d) || exit 1` to prevent execution with an empty or unset variable. AI

IMPACT Highlights potential risks of AI code execution and the need for robust safety checks within AI agents.

RANK_REASON User report of a bug in an AI coding assistant.

Read on dev.to — Claude Code tag →

AI-generated summary · Google Gemini · from 1 sources. How we write summaries →

Claude Code accidentally deletes user's C: drive on Windows 11

How we ranked this

Signal score
24 / 100
Composite score across the factors below. Higher = stronger signal that this story matters right now.
Newsworthiness bucket
Tool
User report of a bug in an AI coding assistant.
Source corroboration
Single-source cluster
Only one publisher covered this so far. Single-source stories can still rank when the publisher is high-authority, but they lack cross-source corroboration.
Topics
product, safety
Editorial topic classification. Feeds into how the story surfaces on /topic/<slug> hub pages and into the per-entity coverage mix.
AI-industry relevance
High
Clearly on-topic for AI-industry coverage.
Story freshness
Breaking (< 6h)
Fresh story with cross-source coverage still developing. Ranking may shift as more sources report.

Full methodology in our editorial standards.

COVERAGE [1]

  1. dev.to — Claude Code tag TIER_1 English(EN) · Agency Kit Studio ·

    rm -rf inside a script: an empty variable a hook cannot see

    <p>A <a href="https://github.com/anthropics/claude-code/issues/112156" rel="noopener noreferrer">report in the Claude Code issue tracker</a> describes how a session in auto mode on Windows 11 deleted a large part of the C: drive. According to the report, it went like this:</p> <u…