--name flag sets session metadata but doesn't display name in TUI header
Resolved 💬 5 comments Opened Apr 11, 2026 by glouie Closed Apr 18, 2026
Description
When starting a session with claude --name "My Session", the name is stored in the session JSON metadata (and works for --resume), but it does not display in the TUI header/prompt area.
In contrast, using /rename My Session during an interactive session both updates the metadata and displays the name in the TUI header.
Steps to Reproduce
- Start a session:
claude --name "Test Name" - Observe: no session name visible in the TUI header near the input area
- During the session, run
/rename Test Name - Observe: the name now appears in the TUI header
Expected Behavior
--name should display the session name in the TUI header the same way /rename does. Both set the same name field in ~/.claude/sessions/<pid>.json — the visual display should be consistent.
Actual Behavior
--name: metadata only (resume works, no visual display)/rename: metadata + visual display
Additional Context
A SessionStart hook was also attempted as a workaround but performed worse — it didn't even set the metadata for resume purposes.
Environment
- Claude Code CLI
- macOS
This issue has 5 comments on GitHub. Read the full discussion on GitHub ↗