TechBroz · techbroz.com68 incidents on record · updated as they happen
← Today in agent chaos

Agent chaosAs reported·24 Nov 2026

Claude Code's delete guard blocked the project folder by name, then let a wildcard wipe it: 23 GB gone

As reported One person’s public account. We couldn’t independently confirm it, and we’ll update this if the facts change.

A developer says a Claude Code subagent tidied up a stray folder with a wildcard delete that also matched the real project. About 30,000 files and 23 GB, six months of work, were gone. The guard blocks that folder by name, but not by wildcard.

This is one person's account on GitHub, not independently confirmed. A second user says they reproduced the same gap in a test folder.

What happened

The developer was running the Claude Code desktop app, version 2.1.326, on Windows 10 with Git Bash, in the mode that skips permission prompts. One of its helper agents was working inside a project folder on the Desktop whose name contained spaces.

Because a path was left unquoted, the helper accidentally created a stray folder with a shorter version of the project's name. Then it tidied up after itself with a delete command ending in a wildcard: remove everything that starts with that shorter name.

The wildcard matched the stray folder. It also matched the real project folder, the one the agent was working in. According to the report, about 30,000 files and 23 GB, six months of work, were deleted. Git Bash's delete skips the Recycle Bin, and on the SSD the files could not be recovered.

How it slipped through

Claude Code has a built-in check for deletes aimed at the working folder, its parent folders or the home folder. Even with prompts switched off, that check is supposed to stop the command or ask first. The reporter shows it does exactly that when the folder is named in full.

The gap is the wildcard. The check does not expand the wildcard to see which real folders it hits, so a pattern that only becomes the project folder after expansion is not treated as dangerous. The reporter says the same thing happened again on version 2.1.328 in a test.

Another user wrote that they could still reproduce it on versions 2.1.329 and 2.1.330 with prompts switched off. With normal permission settings, they said, a different rule stops wildcard deletes altogether.

What Anthropic said

Nothing public yet. The issue was opened on 19 November and was still open when we checked. The reporter asks for wildcards to be expanded before the safety decision is made, for deletes in Git Bash on Windows to go to the Recycle Bin, and for the full list of targets to be shown before any wildcard delete.

Our take

This is the most ordinary command an agent ever runs: clean up the mess it just made. The safety check judged the words, not what the words turned into. If you switch prompts off, do it in a container or a throwaway copy, not in the only copy of six months of work. And keep a backup that a delete command cannot reach.

Lesson for builders

A delete guard that reads the command before the shell expands it can be walked past with one wildcard. Run no-prompt agents in a sandbox and keep backups out of their reach.

Fail card: Claude Code's delete guard blocked the project folder by name, then let a wildcard wipe it: 23 GB gone
The fail card

This story in one shareable card. Tap to open it full size.

Share on X All fail cards →

More agent chaos

Every day of agent chaos →

More fails

Get TechBroz Weekly free → All 68 fails