Stop Claude Code from wiping your working tree with a PreToolUse hook
A shell allow-list can already keep Claude Code off rm -rf and force-push. It often still leaves git reset --hard , git checkout -- . , and git clean -fdx . Those commands throw away uncommitted work in a single shot. After a messy diff or a failed merge, the model will reach for them as a "clean s…
Read the full story at DEV Community — AI ↗
Timeline · 2 reports
- 2026-12-04 00:57 · DEV Community — AI
Stop Claude Code from publishing a package with a PreToolUse hook - 2026-12-02 01:01 · DEV Community — AI
Stop Claude Code from wiping your working tree with a PreToolUse hook