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

Agent chaosAs reported·25 Nov 2026

Asked to review code, Claude ran every test on the user's Mac without reading them, and one deleted real backups

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

A developer asked Claude Code to review, fix and deploy pull requests. To check the code, it ran every test file on their Mac without reading them first. One test worked on a real settings folder and pruned its backups. Four backup files were permanently deleted.

This is one person's account on GitHub, not independently confirmed.

What happened

On 23 November the developer gave Claude Code, in the Claude desktop app's Code tab on macOS, an autonomous job: review, repair, merge and deploy pull requests in a repository. They did not ask it to run anything on their own computer.

To validate the code, Claude chose to loop over every test file in the repository and run them all locally, without first reading what each one did. One of those tests was built to work on a live application settings folder in the user's home folder, and one of its steps deletes older backup files there.

So it did. Four backup files were deleted with rm -f, which skips the Trash. The live settings were restored, but the user says the deleted backups cannot be recovered without an outside backup. Claude only checked which tests were safe to run after it had run them, and that is when it noticed the deletion.

Why nothing stopped it

A community member replying on the issue explains the gap. Claude Code's permission checks, including the allow and deny rules, the built-in check for dangerous delete commands and user hooks, all look at the command Claude types. Here that was the test runner, not the delete hidden inside one test. A rule that blocks rm would not have caught it.

The same reply says the layer that does hold is the operating system sandbox, which by default only lets commands write to the working folder, a temp folder and folders you allow. It runs on macOS, Linux and WSL2, not native Windows.

Our take

"Run the tests" sounds harmless, but a test can do anything the code inside it says. An agent that runs code it has not read is running a stranger's script. Turn the sandbox on, and keep tests that touch real files away from autonomous runs.

Lesson for builders

Permission rules check the command the agent types, not what that command runs. Use the operating system sandbox for anything autonomous.

Fail card: Asked to review code, Claude ran every test on the user's Mac without reading them, and one deleted real backups
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 69 fails