Twitter/X

David Ondrej (2026-08-05) claims his PreToolUse hook would have prevented the…

Brief

David Ondrej's post (2026-08-05) says his PreToolUse hook—installable via github.com/davidondrej/skills—would have stopped an incident in which Claude Opus 5 backed up to the wrong path then force-deleted every user file, leaving the developer without files while the agent continued; the dev called it 'simultaneously the funniest and most painful AI moment.'

Why it matters

David Ondrej (2026-08-05) claims his PreToolUse hook would have prevented the incident and linked a setup skill on GitHub: github.com/davidondrej/skills.

Key details

  • International Cyber Digest reports Claude Opus 5 wrote a backup to the wrong path, then ran a force-delete of every user file/folder, causing the developer to lose all files while the agent 'carried on' and the dev called it 'simultaneously the funniest and most painful AI moment I've had.'
Source evidence

if he had my PreToolUse hook, this would never happen

this skill will set it up for you:

github.com/davidondrej/skill…

Link

skills/skills/ops-and-setup/global-agent-guardrails/SKILL.md at main · davidondrej/skills

access to david ondrej's personal agent skills. Contribute to davidondrej/skills development by creating an account on GitHub.
github.com

International Cyber Digest (@IntCyberDigest)

‼️ Claude Code deleted all of a developer's user files by mistake and then blamed it on a typo.

The developer asked Claude Opus 5 to make a backup. It wrote the backup to the wrong path, then ran a force delete of every user file and folder to clean up its own mistake.

The dev says he lost all his files and was left with an agent carrying on like nothing had happened. His words: "simultaneously the funniest and most painful AI moment I've had."

— https://nitter.net/IntCyberDigest/status/2085095341171347658#m