How PreToolUse hooks intercept tool calls in Claude Code, how exit codes block dangerous commands, and patterns for secret scanning and command gating.

How PreToolUse hooks intercept tool calls in Claude Code, how exit codes block dangerous commands, and patterns for secret scanning and command gating.

An AI coding agent on your laptop runs with your shell. It can rm, it can curl secrets | nc, it can...