[BUG] /clear inherits previous session name instead of resetting it, causing duplicate-named sessions in /resume

Open 💬 5 comments Opened May 21, 2026 by eliasjamesbermudez

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)

What's Wrong?

Running /clear in the CLI terminal clears conversation history but does not reset the session name. The previous session's name persists in the macOS title bar after /clear, marked with a * prefix (e.g., * My Session Name). The new post-clear session is created with the same name as the old one.

When using /resume, both sessions appear under the same name with no way to distinguish them from the picker.

Steps to Reproduce

  1. Start a new Claude Code session in the terminal CLI
  2. Rename it via /rename (e.g., "My Test Session")
  3. Confirm the name appears in the macOS title bar
  4. Run /clear
  5. Observe: title bar still shows * My Test Session — name was not reset
  6. Have a new conversation in this cleared session
  7. Run /resume from a new session — both the original and post-clear session appear as "My Test Session" with no way to differentiate them

Expected Behavior

/clear should reset the session name so the new session starts unnamed and is treated as distinct in /resume.

Actual Behavior

Session name persists after /clear. The new session inherits the name, creating duplicate-named entries in /resume with different content and no way to tell them apart.

Is this a regression?

Yes, this worked in a previous version

Last Working Version

v2.1.89

Claude Code Version

v2.1.146

Platform

Claude Max

Operating System

macOS

Terminal/Shell

fish

Related Issues

  • #59534: /clear does not preserve the previous session for /resume (related regression, different symptom)
  • #60106: clear(new) / clear(reset) orphans sessions in agents-view under duplicate titles (same duplicate-title failure mode, different surface)
  • #37451: /clear semantics discussion (context)

View original on GitHub ↗

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