๐ช
Hooks
Claude CodeDeterministically intervene in the Claude lifecycle
Hooks are a way to deterministically intervene in the Claude lifecycle. They can trigger shell commands, enabling unlimited automation possibilities. For example, you can auto-route permission requests to Slack or Opus, or nudge Claude to continue at turn end.
How to Use
1
Define hooks in the hooks section of settings.json
2
Run pre/post-processing scripts before/after tool calls (e.g., custom logging)
3
Auto-route permission requests to Slack or other services
4
Nudge Claude to continue at turn end (agent execution or prompt judgment)
Tags
#hooks
#automation
#lifecycle
#slack
#logging
Source
Boris Cherny (@bcherny)