[BUG] Session name from -n flag not shown in prompt display

Resolved 💬 3 comments Opened Mar 30, 2026 by aleos Closed Mar 30, 2026

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 starting Claude Code with claude -n "my-session", the session name is correctly persisted (visible via /resume) and sets the terminal tab title, but is not displayed in the Claude Code prompt (the inline title bar that appears after /rename or when entering plan mode).

What Should Happen?

The prompt display should show the session name on startup when -n is used, the same way it does after /rename.

Steps to Reproduce

  1. Start a session: claude -n "my-session"
  2. Observe: no session name shown in the Claude Code prompt display
  3. Run /rename my-session
  4. Observe: session name now appears in the prompt display

Is this a regression?

I don't know

Claude Code Version

2.1.87 (Claude Code)

Platform

Anthropic API

Operating System

macOS

Terminal/Shell

Other

Additional Information

Terminal: Ghostty

The -n flag help text says: "Set a display name for this session (shown in /resume and terminal title)". The terminal tab title is set correctly — only the in-prompt display is missing.

View original on GitHub ↗

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