[DOCS] Missing `agent_type` field in SessionStart Hook Input documentation

Resolved 💬 3 comments Opened Jan 22, 2026 by coygeek Closed Jan 23, 2026

Documentation Type

Missing documentation (feature not documented)

Documentation Location

https://code.claude.com/docs/en/hooks#sessionstart-input

Section/Topic

The "Hook Input" section, specifically the JSON example provided under SessionStart Input.

Current Documentation

The documentation currently shows the following JSON structure for the SessionStart input:

{
  "session_id": "abc123",
  "transcript_path": "~/.claude/projects/.../00893aaf-19fa-41d2-8238-13269b9b3ca0.jsonl",
  "permission_mode": "default",
  "hook_event_name": "SessionStart",
  "source": "startup"
}

What's Wrong or Missing?

The documentation is missing the agent_type field, which was introduced in version 2.1.2.

According to the changelog, this field is populated if the --agent flag is specified during startup. Without this documentation, developers do not know this field exists or how to utilize it to distinguish between standard sessions and specific agent sessions within their hooks.

Suggested Improvement

Please update the JSON example to include the agent_type field and add a brief description indicating it is present when an agent is specified.

Suggested JSON:

{
  "session_id": "abc123",
  "transcript_path": "~/.claude/projects/.../00893aaf-19fa-41d2-8238-13269b9b3ca0.jsonl",
  "permission_mode": "default",
  "hook_event_name": "SessionStart",
  "source": "startup",
  "agent_type": "code-reviewer"
}

Suggested Description:
"The agent_type field is included if the session was started with a specific agent (e.g., via the --agent flag)."

Impact

High - Prevents users from using a feature

Additional Context

  • Reference: Claude Code Changelog v2.1.2 states: "Added agent_type to SessionStart hook input, populated if --agent is specified".
  • Impact: This field is critical for developers creating conditional logic in their hooks based on whether a specific agent (like a code reviewer or debugger) is active.

View original on GitHub ↗

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