StopFailure API
July 14, 2026 ยท View on GitHub
Available when inheriting from ClaudeHooks::StopFailure:
Runs when the stop phase itself errors. Purely a logging event โ output and exit code are completely ignored by Claude Code.
Input Helpers
| Method | Description |
|---|---|
error | The error message |
error_details | Additional error detail (stack trace, etc.) |
last_assistant_message | The last message Claude produced before the failure |
Hook Exit Codes
Exit code and all output are ignored. Use this hook only for logging or alerting.