[DOCS] Missing `agent_type` field in `SessionStart` hook input documentation

Resolved 💬 2 comments Opened Jan 19, 2026 by coygeek Closed Jan 23, 2026

Documentation Type

Missing documentation (feature not documented)

Documentation Location

https://code.claude.com/docs/en/hooks

Section/Topic

The SessionStart Input section within the Hooks Reference.

Current Documentation

The current JSON example for the SessionStart input is:

{
  "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?

According to the Claude Code version 2.1.2 changelog, the agent_type field was added to the SessionStart hook input to indicate if a session was started using the --agent flag. However, this field is missing from both the field descriptions and the JSON example in the official hooks documentation.

Suggested Improvement

Update the SessionStart Input section to include the agent_type field.

Suggested JSON Example Update:

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

Suggested Field Description Addition:
| Field | Type | Description |
| :--- | :--- | :--- |
| agent_type | string (optional) | Populated with the agent name if the session was started with the --agent flag. |

Impact

High - Prevents users from using a feature

Additional Context

  • This was introduced in Version 2.1.2 of Claude Code.
  • It is a useful field for developers writing hooks that need to behave differently depending on which agent (e.g., a custom specialist agent vs. the default) is initiating the session.

View original on GitHub ↗

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