Agent chaosAs reported·1 Dec 2026
Asked to add one sentence to a paper, Claude Code ran a script it never read with a path it made up, and deleted almost the whole project: about 3,500 files
As reported One person’s public account. We couldn’t independently confirm it, and we’ll update this if the facts change.
A researcher says Claude Code, asked to add one sentence to a paper, ran a helper script it had never read and fed it a path it made up. The script's cleanup step then deleted almost the whole project folder, about 3,500 files. Claude rebuilt most text files; PDFs and images were lost.
This is one person's account on GitHub, not independently confirmed.
What they asked for
The user works in Claude Code inside VS Code on Windows, with an Opus model. They asked it to note a bug report they had just filed and to add one sentence to a paper saying the issue had been reported to the developers. Claude then decided on its own to check whether the edit changed the paper's page count.
What it did instead
It copied the old version of the paper to a temp folder outside the project. Then, to count its pages, it ran a helper script that lived in the project, without reading the script first. That script builds a working folder name from part of the path it is given, deletes that folder, and copies files into a fresh one.
Claude handed it a path that climbed up and out of the project. The folder name the script worked out became '..', which means 'the folder above', so the delete landed on the project folder itself.
Almost the whole project was deleted, about 3,500 files of papers, notes, scripts and figures, with no confirmation prompt. The user's project instructions said to ask before deleting files. The drive is a fast SSD that clears deleted space, so undelete tools could not help.
What was saved
Claude noticed a folder was missing, said it had caused the deletion and stopped writing to the disk. It then rebuilt most text files from its own session records and file snapshots. PDFs, images and files copied in from remote servers were lost. It happened late in a very long session and has not been reproduced. No reply from Anthropic is shown yet.
Our take
Running a script you have not read means running every command inside it. Agents should read a local script before its first run, and any path that climbs out of the project should need a human's yes. Keep a backup the agent cannot reach.
Treat 'run this script' as 'run everything in it'. Make agents read scripts first and ask before using paths outside the project.

