Skip to content
Prompt & SolderHow to Ask Claude
All builds

Image: dev.to

Failed Horror story Proof shown

Mac files deleted while Claude Code built a guard against deletion

Late one night, while Claude Code worked on a project to stop agents deleting files, a large number of files on the developer's Mac were deleted.

—

Credits

  • Article author ryodevapp Source ↗

Earliest dated source: 20 Oct 2026

What went wrong

The lesson

Run agents somewhere they can only touch the project: a container, a separate user or a VM. Time Machine or another backup is what turns this from a disaster into an inconvenience.

The full story

Late one night in October 2026, while Claude Code worked on a script guard meant to stop deletes when given the home directory, a large number of files in the developer's Mac home folder were deleted. Their best guess: a subagent ran the test before writing the guard, and the test passed the real home directory to the script.

About nine days of unpushed commits were lost with the local .git folder. They recovered 1,004 files from Claude's conversation transcripts, but anything the subagents wrote wasn't in them. Their conclusion: permission checks and hooks only see the command Claude types, not paths passed inside a script it runs, so the real defences are the OS-level sandbox and an off-machine backup.

How it was done

Tools

Themes

Loading themes…

Sources

From the maker's own write-up or code. We summarise what they report; we haven't tested it ourselves.

  • DEV: My Mac's files were deleted while Claude Code was building a guard against deleting filesBlog or write-updev.to
    Article author: ryodevappPublished 20 Oct 2026

    The developer's detailed write-up, with settings to check.

Related builds

Finding related builds…

Prompt & Solder

An independent community project. Not affiliated with Anthropic.

What this is. Real projects where people used Claude to build, fix, port, revive or take apart something, from jailbroken Kindles to rebuilt DOS games, plus the times it went badly wrong. Every build links to where it was shared, and every source is listed here.

How far to trust it. We summarise what people reported and say what each build rests on: a full write-up with code, a short post, or a passing comment. We haven't tested them ourselves. Photos are shown from the original sources with credit. Only modify hardware you own, and back up first.

Privacy. No accounts. Analytics cookies (Google Analytics) only if you accept them; no ads or cross-site tracking. Searches are counted anonymously (just the words) to show what's popular, and so are clicks on Ask Claude (just the count). The Claude connector only receives the search words your Claude sends it.

How toAsk ClaudeEvery sourceStatsSubmit a buildPrivacyRSS