Key Info

Command Code now supports hooks that run before tool execution, enabling users to block unsafe commands and enforce project rules, with a documented example of a PreToolUse hook intercepting rm -rf before it runs.

Highlights

  • Hooks run prior to tool execution in Command Code
  • Example: a PreToolUse hook blocks dangerous commands like rm -rf
  • Hooks can enforce project-specific rules
  • Official docs released for further reading on Hooks