
Claude Code PreToolUse Hook: Copy-Paste Block Scripts
Claude Code PreToolUse hook guide: exact JSON input, allow/deny/ask output, exit codes, error fixes, copy-paste scripts that block risky headless runs.
Nov 5, 202618 min read0 reactions0 comments
Tag archive

Claude Code PreToolUse hook guide: exact JSON input, allow/deny/ask output, exit codes, error fixes, copy-paste scripts that block risky headless runs.
Two ways to deny a dangerous rm before it runs: exit code 2 and permissionDecision. Why a hook deny works even in bypassPermissions, and where string