claude --resume shows no history: wrong folder, swept transcript, compaction or a loader bug
Published · Updated · Checked against Claude Code 2.1.319
You run claude --resume and the list is empty, or you pick a session and Claude answers as if you had never spoken. Those are two different problems. An empty or incomplete picker is almost always the wrong directory or a swept transcript. A session that opens with an amnesiac model is compaction, or a loader bug reported in some 2.1.x versions.
The picker shows nothing, or not that session
Claude Code stores sessions per project directory, and the picker is scoped to it. The docs say it shows the current worktree's sessions plus those from projects that added the current directory with /add-dir. Ctrl+W widens it to all worktrees of the repository, and Ctrl+A to every project on the machine.
A moved or renamed project folder
The folder under ~/.claude/projects/ is named after your working directory. Per the docs, every character other than a letter or digit becomes -, and a converted name longer than 200 characters is cut to 200 with a hash of the full path appended.
# the folder name Claude Code should use for this directory
pwd | sed 's/[^A-Za-z0-9]/-/g'
ls ~/.claude/projects | grep "$(basename "$PWD")"
Move ~/code/app to ~/work/app and the folder name changes, while your old sessions stay filed under the old name. They are not lost; they sit under a path you no longer start from. There are three fixes, from least invasive:
- Press
Ctrl+Ain the picker to list every project. Picking a session from an unrelated project copies acdand resume command to your clipboard, and if that directory no longer exists Claude Code resumes the session in your current directory instead. - Resume by transcript path, which the docs support:
claude --resume ~/.claude/projects/-Users-me-old-path-app/<session-id>.jsonl. - Resume by ID from anywhere with
claude --resume <session-id>. It searches the current project first, then all others, and resolves only when exactly one other project holds that ID.
The docs do not state that copying the old folder to the new name is supported. It should work, since the name is only a lookup key, but try it on a copy. To avoid the problem in the first place, CLAUDE_CODE_PROJECT_DIR_NAME (with CLAUDE_CONFIG_DIR, v2.1.234 or later) pins the folder name. It is aimed at hosts that embed Claude Code, so read the docs before using it on a laptop.
Sessions hidden on purpose
Sessions made with claude -p or the Agent SDK, and sessions whose first prompt was /loop, do not appear in the picker or in claude --continue. claude --resume <session-id> still finds the -p ones.
A deleted transcript
If find ~/.claude/projects -name '<session-id>*' finds nothing, the age sweep probably removed it; default retention is 30 days. See Claude Code deletes transcripts after 30 days and Claude Code "session not found".
The session opens but the history is gone
Rule out compaction first. The docs say a compacted session opens at a Conversation compacted row, and Claude continues from the last compaction's summary, the messages it left unsummarized, and everything after. The messages that compaction summarized are not loaded again, by design.
Then look at the file, because a real session is large.
f=~/.claude/projects/-Users-me-myapp/<session-id>.jsonl
ls -lh "$f"
wc -l "$f"
A file of several megabytes and a model that ignores it points at a loader bug. Two reports exist.
anthropics/claude-code#40319: resuming long sessions (12 to 20 MB files) loaded no history and gave no warning. It was reported on 2.1.86, with commenters placing the regression between 2.1.84 and 2.1.85, and a stale-issue bot closed it as not planned with no Anthropic reply. The causes in the thread are community analysis, namely a broken parentUuid chain when progress entries are removed and replayed messages after an interrupt reusing UUIDs, and none of it is confirmed by Anthropic.
anthropics/claude-code#43303: on 2.1.91 on Windows, /resume came back without that day's history. It was closed as a duplicate of an earlier issue, with no maintainer reply.
From #40319 comes a way to measure it: check how many tokens the first request after resume read from cache. In 2.1.319 transcripts the assistant lines carry message.usage.cache_read_input_tokens. The docs say the entry format is internal and changes between versions, so this is a diagnostic, not an API.
jq -r 'select(.type=="assistant") | .message.usage.cache_read_input_tokens' "$f" | head -20
A session that carried hundreds of thousands of cached tokens before you quit and starts at roughly the size of a system prompt after resume is the symptom that reporter described.
After an update
#13625 reported that after updating from 2.0.60 to 2.0.64, all transcripts had modification times matching the install and /resume showed "Resume cancelled." history.jsonl still listed the sessions. A bot closed it as a duplicate with no maintainer reply. The reporter inferred the update from timing, and nothing confirms that updates alter transcripts.
A related effect is worth knowing. Community analysis in #59248 says the cleanup keys on file modification time, so an update, sync client or restore that rewrites mtimes can make a live session look old. Anthropic has not confirmed that.
Triage order
Start with find ~/.claude/projects -name '<session-id>*'; a missing file means deleted. If the file turns up elsewhere, press Ctrl+A in the picker, since a path change is the likely cause. Then ls -lh the file. A small one means little was ever saved. A large one with an amnesiac model means a loader problem, so read where Claude Code stores sessions and copy the file before editing anything.
Where Sealkeep helps
Sealkeep keeps an encrypted copy of every session as it finishes, so a swept transcript is not the end. sealkeep recover <session-file> puts a missing file back where resume expects it, sealkeep recover <id> <dest> restores the original bytes to a path you pick, and sealkeep search <query> --content finds a session by what was said in it.
It does not fix the picker's directory scoping, a moved folder or a loader bug, since a copy of a broken file is a broken file. It also cannot recover sessions deleted before it was installed.
FAQ
Why does claude --resume show an empty list in a new folder?
Sessions belong to the directory they started in. Press Ctrl+A to list every project, or resume by ID.
Does /clear delete the session?
No. The docs say Claude Code saves the previous session, and you can resume it with /resume.
Does compaction delete the transcript?
The docs say a resumed session continues from the last compaction's summary and later messages. They do not say the earlier lines are removed from the file, and this is untested. See also /compact loses context.
Can I resume from a .jsonl file I copied from another machine?
The docs support claude --resume <transcript-path>. Moving between machines is covered in moving Claude Code sessions to a new computer.
Docs read 10 November 2026 (they reference versions up to v2.1.314); the install checked is 2.1.319.