[Bug] Hook Status Label Shows "Hook Error" for Successful Executions
Bug Description
Title: Hook Status Label "Hook Error" Appears for Successful Hook Execution
Description:
When Claude Code hooks execute successfully, they are labeled as "hook error" in the transcript. This appears to be either a bug or undocumented behavior, as the hooks complete normally with exit code 0 and valid JSON output.
Steps to Reproduce:
- Enable stub hooks or any hooks that use system_message in their output
- Execute Claude Code session (e.g., reload or run /issue list)
- Observe the transcript (visible in session output)
Expected Behavior:
Successful hook execution should be labeled in a way that indicates success, not error. For example:
- "Hook executed: SessionStart"
- "⚙ Hook: PreToolUse → allow"
- "Hook status: Stop → allow"
Actual Behavior:
Successful hooks appear labeled as "hook error" in the transcript, creating confusion that something failed when the hook executed normally.
Example Output:
Now, is there anything else you'd like me to help with regarding the stub hooks,
the hook disclosure system, or any other aspect of the Claude Code setup?
⎿ Stop hook error
The Stop hook completed successfully (exit code 0, valid JSON output), but the label suggests an error occurred.
Technical Details:
- Hook exit codes: 0 (success)
- Hook output: Valid JSON with system_message field populated
- No actual errors in hook execution
- Hooks function as intended
Documentation Note:
Claude Code documentation describes that "progress messages appear in transcript mode showing which hook is running, command being executed, success/failure
status, and output or error messages." However, the documentation does not explicitly define what the "hook error" label means or when it should appear for
successful vs failed execution.
Reproducibility:
Consistent - appears every time hooks execute successfully
Severity:
Low - Functional impact is none (hooks work correctly). UX impact is confusing labeling that may cause users to question whether their actions succeeded.
Environment Info
- Platform: darwin
- Terminal: kitty
- Version: 2.0.31
- Feedback ID: e2acd62f-86b3-46ad-9168-f815ca09b4a4
Errors
[]This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗