[BUG] SessionStart:clear systemMessage not rendered after /clear in the default TUI renderer (shown only in ctrl+o or fullscreen)
Preflight
Searched existing issues. #80882 is about the VS Code side panel; this one is the terminal CLI with the default renderer.
What's Wrong?
After /clear, a SessionStart hook's systemMessage (SessionStart:clear says: ...) is not shown in the default terminal renderer.
- 0/17 displayed, across plugin vs
settings.jsonregistration, hook latency 0 to 3 s, with and without a status line, with and without--debug-file. - The hook's
additionalContextreaches the model (17/17) andhook_system_messageis written to the transcript (17/17). - The line is visible in the ctrl+o transcript view, and after toggling back it also appears in the normal view. Resizing the window or pressing ctrl+L does not bring it up.
- With
tui: "fullscreen"it is shown (2/2).
So a hook cannot use the transcript to tell whether its message was actually seen after /clear.
What Should Happen?
SessionStart:clear says: <message> is displayed after /clear in the default renderer, the same way the startup and compact messages are.
Steps to Reproduce
- In an empty directory, create
.claude/settings.jsonwith a SessionStart hook that prints:
``json``
{"systemMessage": "notice <random each run>", "hookSpecificOutput": {"hookEventName": "SessionStart", "additionalContext": "context <random each run>"}}
- Make sure
tuiis not set to"fullscreen". Runclaude: theSessionStart:startup says:line is shown. - Send one message, then run
/clear. - No
SessionStart:clear says:line is shown. Ask the model for the random token fromadditionalContext: it answers correctly. Press ctrl+o: the message is there.
Likely cause
The /clear hook messages are placed at the head of the new transcript, and the default renderer does not repaint rows it has already printed, so a message inserted above the current output never gets drawn.
Claude Code Version
2.1.281 (native install)
Platform
Anthropic API (Claude subscription)
Operating System
macOS (Darwin 25.1.0)
Terminal/Shell
Terminal CLI inside tmux, zsh.
This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗