Skip to content

Docs: "command only" hook events actually support HTTP hooks (except SessionStart) #30171

@nhuerta

Description

@nhuerta

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:

  1. 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
  2. Note the exception that SessionStart is the only event that strictly enforces the command-only restriction.

Environment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions