SessionStart hook sessionTitle is persisted but never shown in the TUI session-name badge
Status Open
Maintainer reply None cached
Activity 1 comment · opened Jul 23, 2026
[BUG] SessionStart hook sessionTitle is persisted but never shown in the TUI session-name badge
Environment
- Claude Code v2.1.218 (also latest at time of writing)
- Windows 11, Git Bash (hook commands execute under bash)
- Interactive TUI session
Description
A SessionStart hook that returns hookSpecificOutput.sessionTitle runs successfully and the title is persisted — the session transcript receives a {"type":"custom-title","customTitle":"..."} record — but the session-name badge above the input box never displays it. The badge behaves as if the session were untitled for the entire session.
Setting a title interactively with /rename updates the badge immediately, so this appears to be a gap where the hook-driven title update reaches session persistence but not the TUI's in-memory display state.
Steps to reproduce
- Create
C:\projects\demo-app\.claude\settings.local.json(a trusted workspace):
{
"hooks": {
"SessionStart": [
{
"matcher": "startup",
"hooks": [
{
"type": "command",
"command": "echo '{\"hookSpecificOutput\":{\"hookEventName\":\"SessionStart\",\"sessionTitle\":\"Demo Session\"}}'"
}
]
}
]
}
}
- Run
claudeinC:\projects\demo-appand send any message. - Observe the session-name badge above the input box.
Expected
The badge shows "Demo Session", the same as if the user had run /rename Demo Session.
Actual
- The badge never appears / stays in its untitled state.
- The hook did run: its stdout is captured in the transcript with exit code 0, and the session
.jsonlunder~/.claude/projects/<dir-slug>/contains:
{"type":"custom-title","customTitle":"Demo Session","sessionId":"..."}
- The title is also persisted when the same hook is supplied via
--settings <file>(verified in print mode), so the hook-output path itself works; only the badge display is missing.
Notes
/renamefrom inside the session updates the badge instantly, so the display path exists — it's just not triggered by the hook'ssessionTitleoutput.
This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗