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

๐Ÿ“š Shared input helpers

MethodDescription
errorThe error message
error_detailsAdditional error detail (stack trace, etc.)
last_assistant_messageThe 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.