PreCompact hook statusMessage spinner not displayed
Resolved 💬 2 comments Opened Feb 20, 2026 by shingo-ogaki Closed Mar 20, 2026
Bug description
The statusMessage property configured on a PreCompact hook handler is not displayed as a spinner while the hook runs. The hook itself executes successfully, but no custom spinner message appears.
Steps to reproduce
- Configure a PreCompact hook in
~/.claude/settings.json:
{
"hooks": {
"PreCompact": [
{
"hooks": [
{
"type": "command",
"command": "sleep 10 && echo done",
"timeout": 120,
"statusMessage": "Custom spinner message..."
}
]
}
]
}
}
- Start a Claude Code session, fill context, then run
/compact - Observe that no "Custom spinner message..." spinner is shown during the hook execution
Expected behavior
A spinner with the text "Custom spinner message..." should be displayed while the PreCompact hook command is running (for ~10+ seconds, clearly visible).
Actual behavior
No spinner is displayed. After the hook completes, the result appears as dim text:
Compacted (ctrl+o to see full summary)
PreCompact [sleep 10 && echo done] completed successfully: done
The hook runs and completes successfully — only the statusMessage UI feedback is missing.
Environment
- Claude Code version: 2.1.42
- OS: macOS (Darwin 25.0.0)
- Shell: zsh
Notes
- The same
statusMessagefield onSessionStarthooks also does not appear to show a spinner (thoughSessionStarthooks typically complete too quickly to notice). - Issue #16002 reports a different statusMessage problem (PreToolUse rendering repeatedly). This issue is about statusMessage not rendering at all for PreCompact.
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗