[BUG] session started with `--name` CLI flag does not show the session name in the top right corner of the prompt box
Status Fixed / completed
Reported on v2.1.75
Maintainer reply ✓ Yes — ashwin-ant
Workaround ✓ Mentioned in thread ↓
Activity 6 comments · opened Mar 14, 2026 · closed Apr 18, 2026
💡 Likely answer: A maintainer (ashwin-ant, collaborator)
responded on this thread — see the highlighted reply below.
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?
As 2.1.75, when the session name is set via /rename command, I can see the top-right label in the prompt box:
<img width="712" height="147" alt="Image" src="https://github.com/user-attachments/assets/a2de322c-2b53-4bed-a806-b371e15875be" />
_BUT_ when I start a session with --name CLI flag (which is added in 2.1.76), it the label doesn't appear.
What Should Happen?
The session name should be displayed regardless of how the session name is set.
Error Messages/Logs
Steps to Reproduce
- Start a session with
claude --name foobar - "foobar" is not displayed in the top right corner.
Claude Model
None
Is this a regression?
No, this never worked
Last Working Version
_No response_
Claude Code Version
2.1.76
Platform
Anthropic API
Operating System
macOS
Terminal/Shell
iTerm2
Additional Information
_No response_
6 Comments
Workaround
After starting with
--name, run/renamewith the same name to force the UI label:The
--nameflag sets the session name internally but doesn't trigger the UI label rendering./renametriggers the full UI update.Alternatively, use
--resumewith a name (which combines naming + display):This is sad...
I need this flag to work. For my launch aliases.
I can't start sessions with my new names that I assigned to
it's simply not workin
_Valve, pls fix_
Thanks for the report — fixed, will be in the next release.
--namewill show in the prompt-box banner on startup and persist across--resume.This was fixed in v2.1.113 — Sessions started with
--namenow show the session name in the prompt-box banner immediately on startup and after--resume. If you're still seeing this in the latest version, please comment with your version and repro and we'll reopen.This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.