I ran claude --continue to pick up where I left off, and it didn't find my previous session. Here's why that happens and how I got it back.
Why --continue misses sessions
Claude Code saves sessions per folder, under ~/.claude/projects/. Each project gets a subfolder named after the full path where you launched claude, with slashes and underscores turned into dashes.
--continue only opens the most recent session in your current folder. So it picks the wrong one if:
- you started a newer session in the same folder since, or
- the original session was launched from a different folder (a parent directory, for example).
Step 1: List the session folders
ls ~/.claude/projects/
Look for folders that match your project path. In my case there were two candidates: one for the parent claude_skills folder and one for the anki-skill subfolder.
Step 2: Search for a word unique to that conversation
Each session is a .jsonl file, so you can grep for something distinctive you know came up in the conversation, like a config key, filename, or error message:
ls -lt $(grep -l "webCorsOriginList" ~/.claude/projects/-Users-yourname-path-to-project*/*.jsonl)
grep -l lists the files that contain the word, and ls -lt sorts them newest first. My top result was:
~/.claude/projects/-Users-yourname-...-anki-skill/aaa6d99e-356e-4148-982e-e6e7a3133939.jsonl
The folder name tells you where the session was started, and the filename (minus .jsonl) is the session ID.
Step 3: Resume it from the matching folder
cd /path/to/anki-skill
claude --resume aaa6d99e-356e-4148-982e-e6e7a3133939
Run this from the folder the session belongs to, or Claude Code won't find it.
A note on multiple tabs
It's fine to resume a session while a different session is open in another terminal tab. Just don't resume the same session in two tabs at once, since both would write to the same transcript. Also avoid having two sessions edit the same files at the same time.
TL;DR
Skip the guesswork and go straight to Step 2: grep for a word unique to the conversation you want. The file path gives you the folder and the session ID, and claude --resume <id> brings it back.
Top comments (0)