Unverified50% confidenceDecision RuleExact time
A PreToolUse hook can block the corresponding tool call by returning a non-zero exit code.
1
Sources
50%
Confidence
Medium-term (~90 days)
Relevance
10/28/2026
First Seen
Valid until: 1/26/2027
Sources
Claude Code in Practice: Mastering AI Coding Agents, MCP, and Skills
youtubeCode Culture10/28/2026
Related Entities
Related Claims
UnverifiedHooks scripts use exit code 0 to allow the action normally and exit code 2 to block the current operation, in which case the standard error output is passed back to the model as the reason for blocking; other non-zero exit codes are usually treated only as the script itself erroring and do not necessarily block.71% similarUnverifiedOn the toolChoice: 'none' rejection path, the repairToolCall and experimental_refineToolInput hooks are not triggered.68% similarUnverifiedWhen a coding agent's hook crashes, times out, or points to a nonexistent script, most tools by default choose to let it pass (fail-open).66% similarUnverifiedAfter deleting the text_any line from the notool-001 case and testing with only an idle agent (no tool calls, empty text), the result was PASS with exit code 0.63% similarUnverifiedIn Clawed Code, the RepoGates plugin mounts a hook on the bash tool, reads the exact line before the command runs, and refuses execution if the clone or install points to a blocked repository.62% similar
Cite This Claim
Stable URI
https://kongchang.com/claim/1108116API
curl https://kongchang.com/api/v1/knowledge/claims/1108116MCP
get_claim(id=1108116)