Notification API

January 4, 2026 ยท View on GitHub

Available when inheriting from ClaudeHooks::Notification:

Input Helpers

Input helpers to access the data provided by Claude Code through STDIN.

๐Ÿ“š Shared input helpers

MethodDescription
messageGet the notification message content
notification_messageAlias for message
notification_typeGet the notification type: 'permission_prompt', 'idle_prompt', 'auth_success', 'elicitation_dialog'

Hook State Helpers

Notifications are outside facing and do not have any specific state to modify.

๐Ÿ“š Shared hook state methods

Output Helpers

Output helpers provide access to the hook's output data and helper methods for working with the output state. Notifications don't have any specific hook state and thus doesn't have any specific output helpers.

๐Ÿ“š Shared output helpers

Hook Exit Codes

Exit CodeBehavior
exit 0Operation continues
Logged to debug only (--debug)
exit 1Non-blocking error
Logged to debug only (--debug)
exit 2N/A
Logged to debug only (--debug)