Stop Claude Code from rewriting dist and .next with a PreToolUse hook
This story is from 2026-11-24. It is preserved in the archive; the latest stories are on the live feed.
A write guard that only protects .env will still let Claude Code "help" by regenerating dist , .next , or coverage . Those folders are build output. A PreToolUse hook can reject Edit and Write paths that land there, so the model has to change source instead. The hook should name the blocked folder…
Read the full story at DEV Community — AI ↗
Timeline · 2 reports
- 2026-11-25 00:55 · DEV Community — AI
Stop a Claude Code subagent from handing off a dirty diff with a SubagentStop hook - 2026-11-24 00:55 · DEV Community — AI
Stop Claude Code from rewriting dist and .next with a PreToolUse hook