[Bug] Hook status messages displayed on every API response
Bug Description
Claude Code Hook Status Messages Displayed on Every Response
Status: Confirmed Bug
Versions Tested: 2.0.19, 2.0.20
Severity: High (Blocks Hook Functionality)
Platform: macOS
---
Summary
Claude Code displays hook status messages as system-reminders at the end of every response, even though hooks are configured to run only once at session start. This repetitive message spam makes hooks effectively unusable for any practical purpose, blocking legitimate project automation and tracking workflows.
Expected Behavior
When a SessionStart hook is configured and runs at the beginning of a session:
- ✅ Hook executes once
- ✅ Status message appears once (or not at all)
- ✅ Subsequent responses contain no hook messages
Actual Behavior
When a SessionStart hook is configured:
- ✅ Hook executes once (confirmed via logging)
- ❌ Status message appears on every response in system-reminders
- ❌ Same message text repeats throughout entire session
Example of repeated output:
SessionStart:startup hook succeeded: ✅ Tracked: [project-name] - Session started
Details: Automatic session tracking via hook
This message appears in system-reminders after every single message, creating significant UI noise.
Reproduction Steps
- Configure a SessionStart hook in
~/.claude/settings.json:
``json``
"hooks": {
"SessionStart": [
{
"hooks": [
{
"type": "command",
"command": "~/path/to/any/script.sh"
}
]
}
]
}
- Start a new Claude Code session
- Observe: Hook status message appears in system-reminders
- Send a follow-up message to Claude
- Observe: Same hook status message appears again in system-reminders
- Repeat step 4-5 multiple times
- Confirm: Hook message appears on every response, not just first response
Diagnostic Data
Session Log Analysis:
- Hook script execution: Once per session start ✓
- Hook status display: Every response ❌
- Timestamp analysis: Same timestamp on all messages (confirms single execution)
- Pattern: Consistent repetition regardless of session duration
Timeline of Observations:
- Version 2.0.19: Hook messages repeat every response
- Version 2.0.20: Hook messages repeat every response (no fix)
- Conclusion: Bug persists across versions
Root Cause Analysis
Possible causes:
- Claude Code is caching and re-displaying hook output as a system-reminder
- System-reminder rendering system is pulling hook status independently of actual hook output
- Hook status messages are being generated by Claude Code itself rather than passed through from hook scripts
Evidence:
- Hook only runs once (verified via log file with timestamps)
- Message content never changes across responses
- Message always appears in system-reminders section (not in normal output)
Impact
- Blocking Issue: Makes hooks unusable for their intended purpose (project tracking, automation)
- User Experience: Creates overwhelming visual noise that worsens with every interaction
- Feature Rejection: Users cannot rely on hooks for anything, rendering the hook system non-functional
Workaround
Disable hooks entirely:
"hooks": {
"SessionStart": [],
"Stop": []
}
This prevents hook status messages but also disables any project tracking or automation.
Requested Fix
Claude Code should:
- Display hook status messages only once per hook execution
- Not repeat hook status messages in subsequent responses
- Consider not showing hook status in system-reminders at all (run silently in background)
---
Additional Context
- Tested On: macOS with global Claude Code configuration
- Hook Type Affected: SessionStart, Stop hooks
- Impact Scope: Any user implementing hooks for project tracking or automation
- Workaround Acceptability: Low (requires disabling useful features)
---
Files Involved
- Claude Code settings file:
~/.claude/settings.json(contains hook configuration) - Hook output visible in: Claude Code system-reminders section
- Hook execution logs: Available in user's configured hook logging directory
---
Questions for Claude Team
- Is hook status display intended to show on every message?
- Can hooks run silently without status messages?
- Is there a flag to suppress hook status messages?
- Is this a known issue in development?
---
Report Date: 2025-10-16
Versions Tested: 2.0.19, 2.0.20
Reproducibility: 100% (consistent across all test sessions)
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗