C:/Program Files/Git/clear resets session ID but retains renamed session name

Resolved 💬 4 comments Opened Feb 21, 2026 by gonnector Closed Mar 21, 2026

Bug Description

After running /clear, the session ID changes (indicating a new session is created), but the session name set via /rename in the previous session persists in the UI.

Steps to Reproduce

  1. Start a Claude Code session
  2. Use /rename to set a custom session name (e.g., "My Custom Session")
  3. Confirm the name appears in the input area (top-right corner)
  4. Run /clear
  5. Observe that the session ID has changed
  6. Observe that the old session name still appears

Expected Behavior

One of the following consistent behaviors:

  1. If /clear creates a new session: Both session ID and session name should reset (name should return to default)
  2. If /clear keeps the same session: Session ID should remain unchanged, and name retention would be expected

Actual Behavior

  • Session ID changes (new session)
  • Session name persists (old session property carried over)

This is inconsistent — the session ID suggests a new session was created, but the name from the previous session leaks into the new one.

Environment

  • Claude Code v2.1.50
  • Platform: Windows (MSYS2/Git Bash)
  • Terminal: WezTerm

Screenshot

The renamed session name from the previous session remains visible in the terminal tab title after /clear.

🤖 Generated with Claude Code

View original on GitHub ↗

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