Docs: "command only" hook events actually support HTTP hooks (except SessionStart)
Resolved 💬 3 comments Opened Mar 2, 2026 by nhuerta Closed Mar 26, 2026
Description
The hooks reference under "Prompt-based hooks" lists these events as only supporting type: "command" hooks:
ConfigChangeNotificationPreCompactSessionEndSessionStartSubagentStartTeammateIdleWorktreeCreateWorktreeRemove
What actually happens
In practice, HTTP hooks (type: "http") work correctly for most of these events. We tested with a local HTTP server receiving hooks for all events and confirmed that SessionEnd, Notification, SubagentStart, SubagentStop, and PreCompact all fire HTTP hooks successfully.
The only event that actually enforces the "command only" restriction is SessionStart (likely due to its deferred execution path — see related issue).
Suggestion
Update the docs to accurately reflect which hook types each event supports. Either:
- Move the working events (
SessionEnd,Notification,SubagentStart,SubagentStop,PreCompact, etc.) out of the "command only" list and document that they supportcommandandhttp(but notprompt/agent), or - Note the exception that
SessionStartis the only event that strictly enforces the command-only restriction.
Environment
- Claude Code version: 2.1.63
- Docs page: https://code.claude.com/docs/en/hooks (section: "Prompt-based hooks")
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗