[DOCS] Notification hook docs omit `agent_needs_input` and `agent_completed` types added in v2.1.198

Open 💬 0 comments Opened Jul 1, 2026 by coygeek

Documentation Type

Incorrect/outdated documentation

Documentation Location

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

Section/Topic

  • The "### Notification" subsection under the hook events reference
  • The "Notification input" paragraph that lists the supplied notification_type values
  • The lifecycle table row that describes what the Notification hook fires on

Current Documentation

The Notification hook section currently enumerates the supported notification types:

Runs when Claude Code sends notifications. Matches on notification type: permission_prompt, idle_prompt, auth_success, elicitation_dialog, elicitation_complete, elicitation_response. Omit the matcher to run hooks for all notification types.

The lifecycle table row reads:

| Notification | When Claude Code sends a notification |

The Notification input example shows only the existing types:

``json { "session_id": "abc123", "hook_event_name": "Notification", "notification_type": "permission_prompt" } ``

What's Wrong or Missing?

The release notes for v2.1.198 add two new notification types fired from the new claude agents background session flow:

Added background agent notifications in claude agents — sessions that need input or finish now fire the Notification hook (agent_needs_input / agent_completed)

The hooks reference still lists only the six pre-existing types. Hooks written against the new value will not match by the documented matcher pattern, and authors will not know that the new types exist.

Suggested Improvement

Before:

Matches on notification type: permission_prompt, idle_prompt, auth_success, elicitation_dialog, elicitation_complete, elicitation_response.

After:

Matches on notification type: permission_prompt, idle_prompt, auth_success, elicitation_dialog, elicitation_complete, elicitation_response, agent_needs_input, agent_completed. The two agent_* types fire from background agent sessions in claude agents: agent_needs_input when a session needs your input, and agent_completed when a session finishes.

Also extend the "Notification input" example to show one of the new types so the agent_completed payload is visible end-to-end, and update the lifecycle table row so it makes clear that the event now covers background agents as well as the older UI prompts.

Impact

Medium - Makes feature difficult to understand

Additional Context

Related v2.1.198 change:

Added background agent notifications in claude agents — sessions that need input or finish now fire the Notification hook (agent_needs_input / agent_completed)

The hooks guide also references the Notification hook, but the matcher set used in its examples is the same six-value list, so it will need the same update for consistency.

Affected Pages:

| Page | Context |
|---|---|
| https://code.claude.com/docs/en/hooks | Notification matcher list, Notification input section, and lifecycle table row |
| https://code.claude.com/docs/en/hooks-guide | Examples that document the same matcher set |

View original on GitHub ↗