Resuming a Session
# Continue the most recent sessionclaude --continue # or: claude -c
# Choose a specific session (interactive picker)claude --resume # or: claude -r
# Resume by IDclaude --resume abc123def
# Resume from a GitHub PR (v2.1.49+)claude --from-pr 123Sessions are stored in ~/.claude/projects/<encoded-path>/ as JSONL files.
Searching Sessions
The session-search.sh script (provided in examples/scripts/) is the fastest method: zero dependencies, 15ms to list, 400ms to search.
cs # 10 recent sessionscs "authentication" # Full-text searchcs "Prisma migration" # AND multi-wordcs --since 7d # Last 7 dayscs -p my-project "auth" # Filter by projectEach result displays the claude --resume <id> command ready to copy-paste.
Critical Limitation: Directory Scope
Claude Code stores sessions by encoding the absolute path of the project. A session in /home/user/myapp will not be found if you move the project to /home/user/projects/myapp.
Solution if you move a project:
cd ~/.claude/projects/mv -- -old-location-myapp- -new-location-myapp-Manual migration of the session folder works in the vast majority of cases.
What Resuming Does NOT Do
Resuming a session does not restore:
- Implicit decisions made during the session
- Context of files that changed in the meantime
- Modified environment variables or configs
For important decisions (architecture choices, conventions), note them explicitly in CLAUDE.md rather than relying on session memory. It is more reliable and benefits future sessions.
Sessions and Sub-Agents
Sub-agent sessions (delegated tasks) are stored in a subagents/ subfolder. They do not appear in the normal --resume list. If you migrate sessions manually, copy this subfolder too.
Complementary Tools
| Tool | Usage | Install |
|---|---|---|
session-search.sh | Fast bash search | Copy from examples/scripts/ |
cc-sessions.py | Incremental index, advanced filters | Python, same folder |
claude-code-viewer | Read-only web browser | npx @kimuson/claude-code-viewer |
Recommended Pattern
Do not rely on --resume as the primary continuity mechanism for long projects. Prefer a well-maintained CLAUDE.md with key decisions, regular commits, and short targeted sessions. Session resumption is a safety net, not a replacement workflow.