[DOCS] Python SDK HookEvent enum missing 4 documented hook events
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:
PreToolUsePostToolUseNotificationStopSubagentStopSubagentStart← Missing from Python SDKPermissionRequest← Missing from Python SDKSessionStartSessionPausePostToolUseFailure← Missing from Python SDKSetup← 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:
- PermissionRequest - Triggered when permission is needed
- PostToolUseFailure - Triggered when a tool use fails
- SubagentStart - Triggered when a subagent starts
- 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
This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗