claude-code - 💡(How to fix) Fix [BUG] /clear inherits previous session name instead of resetting it, causing duplicate-named sessions in /resume

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
RAW_BUFFERClick to expand / collapse

Preflight Checklist

  • I have searched existing issues and this hasn't been reported yet
  • 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)

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

claude-code - 💡(How to fix) Fix [BUG] /clear inherits previous session name instead of resetting it, causing duplicate-named sessions in /resume