[BUG] /clear loses session name from prompt bar and spawns a distinct session

Open 💬 2 comments Opened Jul 2, 2026 by joshingham

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?

Version: 2.1.198

Expected (per docs, https://code.claude.com/docs/en/sessions.md#manage-context-within-a-session — "start fresh with an empty context. The previous conversation is saved and resumable"):
Same session continues, name still shown on the prompt bar.

Actual:

  • The prompt bar no longer shows the name after /clear.
  • The name only survives in the terminal tab title.
  • The picker/--resume shows what looks like a distinct session rather than the same renamed one continuing.

Workaround: running /rename <name> again immediately after /clear restores the prompt-bar display.

This contradicts the documented behavior that /clear resets context within the same session object, leaving the session identity (and its name) untouched.

What Should Happen?

Expected (per docs, https://code.claude.com/docs/en/sessions.md#manage-context-within-a-session — "start fresh with an empty context. The previous conversation is saved and resumable"):
Same session continues, name still shown on the prompt bar.

Error Messages/Logs

Steps to Reproduce

Steps to reproduce:

  1. Start a session, rename it with /rename <name> (or -n <name> at startup) — name shows on the prompt bar as documented.
  2. Run /clear.

Claude Model

Sonnet (default)

Is this a regression?

I don't know

Last Working Version

_No response_

Claude Code Version

2.1.198 (Claude Code)

Platform

Anthropic API

Operating System

Windows

Terminal/Shell

Windows Terminal

Additional Information

_No response_

View original on GitHub ↗

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