Description
The hooks reference under "Prompt-based hooks" lists these events as only supporting type: "command" hooks:
ConfigChange
Notification
PreCompact
SessionEnd
SessionStart
SubagentStart
TeammateIdle
WorktreeCreate
WorktreeRemove
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 support command and http (but not prompt/agent), or
- Note the exception that
SessionStart is the only event that strictly enforces the command-only restriction.
Environment
Description
The hooks reference under "Prompt-based hooks" lists these events as only supporting
type: "command"hooks:ConfigChangeNotificationPreCompactSessionEndSessionStartSubagentStartTeammateIdleWorktreeCreateWorktreeRemoveWhat 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 thatSessionEnd,Notification,SubagentStart,SubagentStop, andPreCompactall 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:
SessionEnd,Notification,SubagentStart,SubagentStop,PreCompact, etc.) out of the "command only" list and document that they supportcommandandhttp(but notprompt/agent), orSessionStartis the only event that strictly enforces the command-only restriction.Environment