[BUG] /resume only shows ~5-10 most recent sessions, older sessions invisible despite existing on disk
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
.jsonlsession files on disk (211 onmainbranch) - In-session
/resumeshows only 5 sessions under "current worktree" claude --resumeshows 255 sessions on main (goes back ~1 month)- All visible sessions in
/resumeare from the last ~24 hours - Project has been active for months with continuous daily usage
What Should Happen?
- In-session
/resumeshould show the same session history asclaude --resume - 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
- Use Claude Code on a project over an extended period (weeks/months), accumulating 100+ sessions
- Start a Claude Code session
- Run
/resumeinside the session - Observe that only ~5 most recent sessions appear under "current worktree"
- Exit and run
claude --resumefrom the CLI — observe that many more sessions appear - 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 (nogitBranchmetadata)initialEnrichCount ?? 10means only ~10 most recent files get their content read (populatinggitBranch,firstPrompt, etc.)- The "current worktree" filter appears to require
gitBranchwhich is only available on enriched entries - Result: non-enriched entries are filtered out, limiting visibility to ~10 sessions
- The in-session
/resumeand CLI--resumelikely 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
/resumelimitation 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.jsonfile 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.jsonlfiles directly viafpT()/KNT(). - No known workaround for in-session
/resume— search does not surface older sessions either. Usingclaude --resumefrom the CLI is a workaround for the limited session list, but not for the missing compaction checkpoint expansion.
This issue has 6 comments on GitHub. Read the full discussion on GitHub ↗