Slash-clear creates sessions invisible to slash-resume picker due to malformed file structure

Resolved 💬 4 comments Opened Mar 27, 2026 by Marksman4971 Closed May 28, 2026

Description

Sessions created after /clear are not shown in the /resume picker, even if they have been /renamed. However, they can be successfully resumed via claude --resume <session_id>.

Root Cause

When /clear is used, the resulting session .jsonl file starts with type: progress records instead of the expected type: init or type: summary record. The /resume picker appears to rely on the initial file structure to identify valid sessions, so it skips these files.

Example of a normal session file start:

{"type":"init", ...}
{"type":"summary", "title":"...", ...}
{"type":"user", ...}

Example of a post-/clear session file start:

{"type":"progress", "parentUuid":null, "isSidechain":false, ...}   ← not expected
{"type":"progress", "parentUuid":null, "isSidechain":false, ...}   ← not expected
{"type":"file-history-snapshot", ...}
{"type":"user", ...}

The custom-title record (from /rename) exists deep in the file (e.g., line 264), but the picker never reaches it because it skips the session early.

Steps to Reproduce

  1. Start a Claude Code session and do some work
  2. Run /rename to name the session (e.g., "Session A")
  3. Run /clear to start fresh within the same process
  4. Do some more work in the new session
  5. Run /rename to name the new session (e.g., "Session B")
  6. Exit and run /resume — "Session B" does not appear in the list
  7. Run claude --resume <session-B-id> — works fine

Expected Behavior

All /renamed sessions should appear in the /resume picker, regardless of how they were created.

Workaround

Use claude --resume <session_id> directly instead of the /resume picker. The session ID can be found by searching the .jsonl files in ~/.claude/projects/.

Environment

  • Claude Code version: latest (2026-03-27)
  • OS: Windows 11 Pro
  • Shell: bash

View original on GitHub ↗

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