claude-code - 💡(How to fix) Fix --name flag does not display TUI session badge [1 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
anthropics/claude-code#49187Fetched 2026-04-17 08:48:25
View on GitHub
Comments
1
Participants
2
Timeline
6
Reactions
0
Author
Timeline (top)
labeled ×4commented ×1cross-referenced ×1

The --name CLI flag sets the session name in metadata (visible in /resume picker and in the session JSONL as customTitle) but does not display the session name badge in the bottom-right corner of the TUI.

The /rename slash command sets the same customTitle field AND displays the badge. Expected behavior: --name should also display the badge.

Root Cause

The --name CLI flag sets the session name in metadata (visible in /resume picker and in the session JSONL as customTitle) but does not display the session name badge in the bottom-right corner of the TUI.

The /rename slash command sets the same customTitle field AND displays the badge. Expected behavior: --name should also display the badge.

Code Example

Opus 4.6 1M | 📁 tigh | 🌿 main ● |4.7% · 46.5k tokens
▸▸ bypass permissions on (shift+tab to cycle)

---

Opus 4.6 1M | 📁 tigh | 🌿 main ● |4.7% · 46.5k tokens           [tigh]
▸▸ bypass permissions on (shift+tab to cycle)
RAW_BUFFERClick to expand / collapse

Description

The --name CLI flag sets the session name in metadata (visible in /resume picker and in the session JSONL as customTitle) but does not display the session name badge in the bottom-right corner of the TUI.

The /rename slash command sets the same customTitle field AND displays the badge. Expected behavior: --name should also display the badge.

Steps to reproduce

  1. Launch Claude Code with --name: claude --name myname
  2. Observe: no session badge in the bottom-right of the TUI
  3. Type /rename myname in the same session
  4. Observe: cyan badge appears in the bottom-right

Expected behavior

--name myname should display the same TUI badge as /rename myname.

Evidence

Session JSONL confirms --name correctly writes {"type": "custom-title", "customTitle": "myname"} as the first record. The data is there, just not rendered in the TUI.

Environment

  • Claude Code (latest, installed via CLI)
  • macOS 15.7.4 (Sequoia), Apple M4
  • Terminal: Ghostty

Screenshots

Without badge (--name only)

The status bar shows the project folder but no session name badge in bottom-right:

Opus 4.6 1M | 📁 tigh | 🌿 main ● | ⚡ 4.7% · 46.5k tokens
▸▸ bypass permissions on (shift+tab to cycle)

With badge (after /rename)

Same session after running /rename tigh — cyan badge appears bottom-right:

Opus 4.6 1M | 📁 tigh | 🌿 main ● | ⚡ 4.7% · 46.5k tokens           [tigh]
▸▸ bypass permissions on (shift+tab to cycle)

extent analysis

TL;DR

The --name CLI flag should be updated to trigger the display of the session name badge in the TUI, similar to the /rename command.

Guidance

  • Investigate the difference in how --name and /rename update the session metadata, focusing on any additional steps or signals that /rename might send to trigger the badge display.
  • Verify that the customTitle field is correctly updated in the session JSONL when using --name, as indicated in the provided evidence.
  • Check the TUI rendering logic to ensure it correctly handles the customTitle field when set by --name, comparing it with how it handles the field when set by /rename.
  • Consider adding a debug log or console output to track when and how the session name badge is updated, to help identify any discrepancies between --name and /rename.

Example

No code snippet is provided as the issue does not include specific code references that can be safely used without further context.

Notes

The solution may involve identifying and replicating the specific signal or update mechanism used by /rename that triggers the display of the session name badge, applying it to the --name CLI flag handling.

Recommendation

Apply a workaround by using the /rename command immediately after launching with --name, until the underlying issue is resolved, as it achieves the desired display of the session name badge.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

FAQ

Expected behavior

--name myname should display the same TUI badge as /rename myname.

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING