--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

  1. Start a session: claude --name "Test Name"
  2. Observe: no session name visible in the TUI header near the input area
  3. During the session, run /rename Test Name
  4. 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

View original on GitHub ↗

This issue has 5 comments on GitHub. Read the full discussion on GitHub ↗