[BUG] /clear inherits previous session name instead of resetting it, causing duplicate-named sessions in /resume
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
- Start a new Claude Code session in the terminal CLI
- Rename it via
/rename(e.g., "My Test Session") - Confirm the name appears in the macOS title bar
- Run
/clear - Observe: title bar still shows
* My Test Session— name was not reset - Have a new conversation in this cleared session
- Run
/resumefrom 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:
/cleardoes 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:
/clearsemantics discussion (context)
This issue has 5 comments on GitHub. Read the full discussion on GitHub ↗