[DOCS] [SDK/DOC Discrepancy] `SubagentStopHookInput` in Python SDK missing `agent_id` and `agent_transcript_path` fields
Documentation Type
Missing documentation (feature not documented)
Documentation Location
https://platform.claude.com/docs/en/agent-sdk/hooks#input-data
Section/Topic
The Hook-specific fields table in the Hooks documentation and the corresponding SubagentStopHookInput type definition in the Python SDK.
Current Documentation
The "Hook-specific fields" table on the documentation page lists the following for the SubagentStop hook:
| Field | Type | Description | Hooks |
| :--- | :--- | :--- | :--- |
| agent_id | string | Unique identifier for the subagent | SubagentStart, SubagentStop |
| agent_transcript_path | string | Path to the subagent's conversation transcript | SubagentStop |
What's Wrong or Missing?
There is a discrepancy between the documentation and the actual Python SDK implementation. In src/claude_agent_sdk/types.py, the SubagentStopHookInput class is missing these fields, making it impossible to programmatically track which subagent has finished or where to find its logs when using the Python SDK.
The current implementation in the SDK source is:
class SubagentStopHookInput(BaseHookInput):
"""Input data for SubagentStop hook events."""
hook_event_name: Literal["SubagentStop"]
stop_hook_active: bool
Suggested Improvement
The Python SDK source code should be updated to match the documentation. Specifically, SubagentStopHookInput in src/claude_agent_sdk/types.py should be updated to include the missing fields:
class SubagentStopHookInput(BaseHookInput):
"""Input data for SubagentStop hook events."""
hook_event_name: Literal["SubagentStop"]
stop_hook_active: bool
agent_id: str
agent_transcript_path: str
If these fields are not yet supported by the Python transport, the documentation table should be updated to clarify that these fields are currently "TypeScript Only" (similar to the SessionStart or Notification hooks).
Impact
High - Prevents users from using a feature
Additional Context
- This issue prevents parity with the TypeScript SDK, where these fields are correctly exposed.
- Without
agent_id, developers cannot correlateSubagentStopevents with theSubagentStartevents or the originalTasktool call. - Reference documentation for the TypeScript implementation: https://platform.claude.com/docs/en/agent-sdk/typescript#subagentstophookinput
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗