claude-code - 💡(How to fix) Fix /clear doesn't update session title — stale title and context usage persist after clearing [1 comments, 2 participants]

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…
GitHub stats
anthropics/claude-code#54534Fetched 2026-04-30 06:43:01
View on GitHub
Comments
1
Participants
2
Timeline
3
Reactions
1
Author
Timeline (top)
labeled ×2commented ×1

After running /clear in a chat session, a new session is started internally, but the tab/session title is not updated. It continues to display the title from the previous conversation, along with stale context usage stats.

Root Cause

After running /clear in a chat session, a new session is started internally, but the tab/session title is not updated. It continues to display the title from the previous conversation, along with stale context usage stats.

RAW_BUFFERClick to expand / collapse

Description

After running /clear in a chat session, a new session is started internally, but the tab/session title is not updated. It continues to display the title from the previous conversation, along with stale context usage stats.

Steps to Reproduce

  1. Start a Claude Code session and have a conversation long enough that it gets a meaningful title.
  2. Run /clear to start a new session.
  3. Observe the session tab title — it still shows the old conversation's title.
  4. Observe the context usage indicator — it still shows the previous session's usage rather than the fresh session's usage.

Expected Behavior

After /clear, the session title should reset (e.g., to "New Session" or be cleared), and the context usage should reset to reflect the new, empty session.

Actual Behavior

The session tab title remains set to the old conversation's title. The context usage indicator continues to display the stale value from the previous session.

Impact

Users see misleading information: the tab title implies they are continuing an old conversation, and the context usage meter shows incorrect (inflated) usage for what is actually a fresh session.

extent analysis

TL;DR

Update the session title and context usage indicator after running the /clear command to reflect the new session.

Guidance

  • Verify that the /clear command correctly resets the internal session state, but not the tab title or context usage indicator.
  • Check the code responsible for updating the session title and context usage indicator to ensure it is triggered after the /clear command.
  • Consider adding an explicit update step for the session title and context usage indicator in the /clear command handler.
  • Review the session management logic to ensure that the title and usage indicator are properly reset when a new session is started.

Example

No code snippet is provided as the issue does not include specific code details.

Notes

The issue seems to be related to the synchronization of internal session state and external display elements. The fix may involve ensuring that the /clear command updates all relevant session attributes, including the title and context usage indicator.

Recommendation

Apply a workaround to update the session title and context usage indicator after the /clear command, as the issue suggests a synchronization problem rather than a version-specific bug.

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 /clear doesn't update session title — stale title and context usage persist after clearing [1 comments, 2 participants]