Resume picker ignores custom session title after /clear

Resolved 💬 2 comments Opened Feb 9, 2026 by samkleespies Closed Mar 10, 2026

Bug Description

The resume session picker (/resume) displays "/clear" as the session label instead of the custom title set via /rename, when the session contains a /clear command earlier in the JSONL transcript.

Sessions that were renamed but never had /clear used display their custom titles correctly.

Steps to Reproduce

  1. Start a new Claude Code session
  2. Have a conversation (send at least one message)
  3. Run /clear to clear the conversation
  4. Run /rename my-session-name
  5. Continue working in the session
  6. Exit the session
  7. Run /resume to open the session picker

Expected: The session appears as "my-session-name" in the picker
Actual: The session appears as "/clear" in the picker

Root Cause Analysis

The session JSONL file correctly contains a custom-title entry:

{"type": "custom-title", "customTitle": "my-session-name", "sessionId": "..."}

However, the resume picker appears to use the first user message text as the display label when /clear appears early in the session file, ignoring the custom-title entry that comes later.

In affected sessions, the /clear command is typically at line 1-2 of the JSONL, while the custom-title entry comes later. Sessions without /clear display their custom titles correctly.

Impact

In my case, 18 out of 29 named sessions (62%) are affected — they all show as "/clear" in the resume picker, making them indistinguishable from each other and effectively unfindable by name.

Environment

  • Claude Code version: 2.1.37
  • Platform: macOS (Darwin 24.6.0, arm64)
  • Shell: zsh

View original on GitHub ↗

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