#hooks
4 items tagged #hooks.
4 items tagged #hooks.
PostToolUse fires after every Claude Code tool call and can inject context, run formatters, and build audit trails — without blocking the agent mid-task.
SessionStart fires once before any tool calls, letting you inject real-time context—git state, sprint focus, oncall rotation—directly into the model's system prompt for that session.
Claude Code hooks run shell commands at deterministic lifecycle points. This guide covers all five events, the JSON contracts each one uses, and which hooks can block versus only observe.