[BUG] /resume only shows ~5-10 most recent sessions, older sessions invisible despite existing on disk

Resolved 💬 6 comments Opened Feb 14, 2026 by alexeigs Closed Mar 17, 2026

What's Wrong?

In-session /resume shows only ~5 most recent sessions, even though hundreds of valid session files exist on disk. Older sessions are invisible — no scrolling or searching surfaces them.

Key finding: claude --resume (CLI flag) works correctly and shows the full session history (255 sessions on main going back ~1 month). Only the in-session /resume command is broken.

Additionally, sessions with multiple compaction points used to be expandable (showing pre-compaction checkpoints to resume from). This expansion no longer works in either claude --resume or /resume.

Evidence from my project:

  • 314 valid .jsonl session files on disk (211 on main branch)
  • In-session /resume shows only 5 sessions under "current worktree"
  • claude --resume shows 255 sessions on main (goes back ~1 month)
  • All visible sessions in /resume are from the last ~24 hours
  • Project has been active for months with continuous daily usage

What Should Happen?

  1. In-session /resume should show the same session history as claude --resume
  2. Sessions with compaction checkpoints should be expandable to resume from pre-compaction states (this used to work)

Error Messages/Logs

No errors — the sessions just silently don't appear. The .jsonl files are intact and readable on disk.

$ find ~/.claude/projects/<project>/ -name "*.jsonl" | wc -l
376

# /resume (in-session) shows only 5 sessions
# claude --resume (CLI) shows 255 sessions on main

Steps to Reproduce

  1. Use Claude Code on a project over an extended period (weeks/months), accumulating 100+ sessions
  2. Start a Claude Code session
  3. Run /resume inside the session
  4. Observe that only ~5 most recent sessions appear under "current worktree"
  5. Exit and run claude --resume from the CLI — observe that many more sessions appear
  6. For sessions with multiple compaction points, note that expanding to pick a pre-compaction checkpoint no longer works

Possible root cause from binary analysis:

  • KNT() creates "lite" session entries from file stats (no gitBranch metadata)
  • initialEnrichCount ?? 10 means only ~10 most recent files get their content read (populating gitBranch, firstPrompt, etc.)
  • The "current worktree" filter appears to require gitBranch which is only available on enriched entries
  • Result: non-enriched entries are filtered out, limiting visibility to ~10 sessions
  • The in-session /resume and CLI --resume likely use different code paths for loading sessions

Environment

  • Claude Code Version: 2.1.41
  • Platform: Anthropic API (Max subscription)
  • OS: macOS (Darwin 24.6.0, Apple Silicon)
  • Terminal: WebStorm integrated terminal and Kitty (reproduced in both)
  • Regression: Yes — session history expansion (pre-compaction checkpoints) used to work. The /resume limitation may also be a regression.
  • cleanupPeriodDays: Set to 3650 (not related — files exist on disk, just not shown in UI)
  • sessions-index.json: Stale since Feb 3, 2026 — zero references to "sessions-index" found in the v2.1.41 binary, suggesting it's been deprecated

Additional Information

  • The sessions-index.json file stopped being updated on Feb 3, 2026. This file appears to no longer be read by v2.1.41 (confirmed by searching the binary — 0 matches for "sessions-index"). The session listing now reads .jsonl files directly via fpT() / KNT().
  • No known workaround for in-session /resume — search does not surface older sessions either. Using claude --resume from the CLI is a workaround for the limited session list, but not for the missing compaction checkpoint expansion.

View original on GitHub ↗

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