[DOCS] Hooks documentation missing StopFailure event

Resolved 💬 2 comments Opened Mar 18, 2026 by coygeek Closed Mar 18, 2026

Documentation Type

Missing documentation (feature not documented)

Documentation Location

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

Section/Topic

"Available events" table listing all hook event types

Current Documentation

The hooks event table lists 19 events (e.g., Notification, Stop, SubagentStop, ToolUse, etc.) but does not include StopFailure. The Stop event is described as firing "When Claude finishes responding," but there is no event for error-terminated turns.

The plugins-reference page replicates the same event list and also omits StopFailure.

What's Wrong or Missing?

Changelog v2.1.78 added a StopFailure hook event that fires when a turn ends due to an API error (rate limit, auth failure, etc.). This event is not listed in the hooks event table, has no schema documentation, and has no usage examples.

Users who want to react to API failures in their hook scripts (e.g., logging rate limit events, sending notifications on auth failures, implementing custom retry logic) cannot discover this event from the documentation.

Suggested Improvement

Add StopFailure to the hook events table:

| Event | Description |
|-------|-------------|
| StopFailure | When the turn ends due to an API error (rate limit, auth failure, etc.) |

Add a schema section for StopFailure similar to existing event schemas (e.g., Stop), documenting the input JSON fields available to hook scripts (error type, error message, etc.).

Impact

Medium - Makes feature difficult to understand

Additional Context

Affected Pages:

| Page | Context |
|------|---------|
| https://code.claude.com/docs/en/hooks | Hook events table and per-event schema sections |
| https://code.claude.com/docs/en/plugins-reference | Plugin hook events list (mirrors hooks.md events) |

Total scope: 2 pages affected

Source: Changelog v2.1.78

Added StopFailure hook event that fires when the turn ends due to an API error (rate limit, auth failure, etc.)

View original on GitHub ↗

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