[DOCS] Incomplete SubagentStop Hook Input Schema in Hooks Reference
Documentation Type
Missing documentation (feature not documented)
Documentation Location
https://code.claude.com/docs/en/hooks#stop-and-subagentstop-input
Section/Topic
The section titled "Stop and SubagentStop Input" under the Hook Input header.
Current Documentation
The documentation currently combines the input schema for both Stop and SubagentStop events into a single JSON example that implies they share the exact same fields:
{
"session_id": "abc123",
"transcript_path": "~/.claude/projects/.../00893aaf-19fa-41d2-8238-13269b9b3ca0.jsonl",
"permission_mode": "default",
"hook_event_name": "Stop",
"stop_hook_active": true
}
What's Wrong or Missing?
The documentation is missing specific fields that are available during a SubagentStop event. According to recent updates (version 2.0.42), the SubagentStop hook payload includes agent_id and agent_transcript_path.
By omitting these fields, developers are unaware they can programmatically access the specific subagent's ID or its independent transcript file to validate subagent performance or logging.
Suggested Improvement
The documentation should explicitly show the fields available to SubagentStop. Since the schema has diverged from the standard Stop hook, it would be clearer to provide a separate JSON example for SubagentStop.
Suggested text:
SubagentStop Input
{
"session_id": "abc123",
"transcript_path": "~/.claude/projects/.../00893aaf-19fa-41d2-8238-13269b9b3ca0.jsonl",
"permission_mode": "default",
"hook_event_name": "SubagentStop",
"stop_hook_active": false,
"agent_id": "agent_01ABC...",
"agent_transcript_path": "~/.claude/projects/.../subagents/agent-agent_01ABC....jsonl"
}
Impact
High - Prevents users from using a feature
Additional Context
- This change aligns with the 2.0.42 changelog note: "Added
agent_idandagent_transcript_pathfields to SubagentStop hooks." - Separating the examples prevents confusion, as
Stop(the main loop) does not have anagent_id, whileSubagentStopdoes.
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗