[BUG] named sessions don't get the name displayed on chat box
Preflight Checklist
- [x] I have searched existing issues and this hasn't been reported yet
- [x] This is a single bug report (please file separate reports for different bugs)
- [x] I am using the latest version of Claude Code
What's Wrong?
When I start a named session the little "title" on the chat box does not get rendered, it does show if I /rename inside the session.
What Should Happen?
Claude should always show the name passed in from --name with the same style as running /rename inside a chat
Error Messages/Logs
Steps to Reproduce
- Start a session with a name:
claude --name test-123 - Notice no name shows up
- Run
/rename test-123-renamed - Notice the session name is displayed
Claude Model
None
Is this a regression?
I don't know
Last Working Version
_No response_
Claude Code Version
2.1.85
Platform
Anthropic API
Operating System
Ubuntu/Debian Linux
Terminal/Shell
Other
Additional Information
Passing in name and no floating name displayed:
<img width="500" alt="Image" src="https://github.com/user-attachments/assets/49eef313-9920-4c8b-9f6c-9839ad4e30df" />
After rename:
<img width="500" alt="Image" src="https://github.com/user-attachments/assets/28c97133-a84a-4c03-b6f2-e211833a2a28" />
Based on session logs, it seems that a customTitle entry is needed for the name to be displayed, maybe claude should emit this when --name is provided?
{"type":"custom-title","customTitle":"test-123-renamed","sessionId":"a238b5db-1dd4-42fc-b4cd-ac9dab579de0"}
{"type":"agent-name","agentName":"test-123-renamed","sessionId":"a238b5db-1dd4-42fc-b4cd-ac9dab579de0"}This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗