[DOCS] Python SDK HookEvent enum missing 4 documented hook events

Resolved 💬 4 comments Opened Jan 26, 2026 by coygeek Closed Feb 1, 2026

Documentation Type

Incorrect/outdated documentation

Documentation Location

https://platform.claude.com/docs/en/agent-sdk/python

Section/Topic

"Hooks" section, HookEvent enum definition

Current Documentation

The Python SDK documentation shows HookEvent with 8 events:

``python class HookEvent(str, Enum): TOOL_START = "tool_start" TOOL_END = "tool_end" AGENT_START = "agent_start" AGENT_END = "agent_end" MODEL_RESPONSE = "model_response" USER_INPUT = "user_input" SESSION_START = "session_start" SESSION_END = "session_end" ``

However, the Claude Code hooks documentation lists 12 hook events:

  • PreToolUse
  • PostToolUse
  • Notification
  • Stop
  • SubagentStop
  • SubagentStart ← Missing from Python SDK
  • PermissionRequest ← Missing from Python SDK
  • SessionStart
  • SessionPause
  • PostToolUseFailure ← Missing from Python SDK
  • Setup ← Missing from Python SDK

What's Wrong or Missing?

The Python SDK HookEvent enum is missing 4 events that are documented in the hooks reference:

  1. PermissionRequest - Triggered when permission is needed
  2. PostToolUseFailure - Triggered when a tool use fails
  3. SubagentStart - Triggered when a subagent starts
  4. Setup - Triggered during setup/initialization

Additionally, the naming convention differs between the SDK (snake_case: tool_start) and the hooks docs (PascalCase: PreToolUse), which may cause confusion.

Suggested Improvement

Update the HookEvent enum to include all documented events:

class HookEvent(str, Enum):
TOOL_START = "tool_start"
TOOL_END = "tool_end"
AGENT_START = "agent_start"
AGENT_END = "agent_end"
MODEL_RESPONSE = "model_response"
USER_INPUT = "user_input"
SESSION_START = "session_start"
SESSION_END = "session_end"
PERMISSION_REQUEST = "permission_request"
POST_TOOL_USE_FAILURE = "post_tool_use_failure"
SUBAGENT_START = "subagent_start"
SETUP = "setup"

Or add a note explaining why certain events are not available in the SDK.

Impact

Medium - Makes feature difficult to understand

Additional Context

Affected Pages:
| Page | Section | Issue |
|------|---------|-------|
| https://platform.claude.com/docs/en/agent-sdk/python | Hooks | HookEvent missing 4 events |
| https://code.claude.com/docs/en/hooks | Hook events | Lists all 12 events |

Total scope: 1 page needs update (agent-sdk/python)

Cross-reference: The complete hook event list is at https://code.claude.com/docs/en/hooks

View original on GitHub ↗

This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗