Claude Code
Where Claude Code stores your sessions, and how to read them again
Every conversation is a file on your Mac. Where it lives, how to resume a session from three weeks ago, and how to export it as readable text.
Published September 29, 2026 · 6 min read
Claude Code saves every conversation as you go, locally. That's what lets you close the terminal and pick up the next day. You just need to know where to look.
The folder: ~/.claude/projects
By default, each session is a JSONL file stored here:
~/.claude/projects/<project>/<session-id>.jsonl
<project> is your working directory's path, with every character that isn't a letter or a digit replaced by a dash. A session started in /Users/me/Code/invoicer ends up in ~/.claude/projects/-Users-me-Code-invoicer/. If that name exceeds 200 characters, Claude Code truncates it and appends a hash of the full path.
Next to each file, a folder with the same name can hold subagent conversations (subagents/) and tool outputs too large to inline (tool-results/).
Each line of the file is a JSON object: a message, a tool call or a metadata entry. The format is internal and changes between versions. To read a session, use the commands below rather than a homemade parser that will break with the next release.
Resume a session
| Command | What it does |
|---|---|
claude --continue | Reopens the most recent conversation in the current directory |
claude --resume | Opens the session picker |
claude --resume <name> | Resumes the session with that name directly |
claude --resume <path> | Resumes the conversation stored in that .jsonl file (absolute path) |
/resume | Switches to another conversation from inside a session |
A resumed session gets its full history back, tool calls included, along with its model, unless that model has been retired or you pick another one at launch.
Find an old session
The picker (/resume, or claude --resume with no argument) shows sessions from the current directory by default. A few shortcuts change everything:
- Ctrl+A widens the list to every project on your Mac. Press it again to go back.
- Type any character to search. Paste a GitHub or GitLab pull request URL to find the session that created it.
- Space previews a session without reopening it.
- Ctrl+B filters to the current git branch.
- Ctrl+R renames the highlighted session.
The easiest habit is naming your sessions: claude -n payments-rework at launch, or /rename payments-rework along the way. Then resume with claude --resume payments-rework. Without a name, Claude Code generates a title from your first prompt, and that title works with --resume too.
Got a session ID? claude --resume <id> works from any directory: Claude Code looks in the current project first, then in every other project on your Mac.
Export it as readable text
Inside a session, /export opens a menu to copy the conversation to your clipboard or save it as a text file, with messages and tool outputs rendered readably. Pass a filename to skip the menu:
/export payments-rework.txt
For scripts, the intended interface is claude -p. For example, to ask an existing session for a summary and read the answer:
claude -p --resume <session-id> --output-format json "summarize what we changed" | jq -r '.result'
And to react whenever a session ends, hooks receive the conversation's path in the transcript_path field: that's what our archiving hook uses.
Move or delete your sessions
- The
CLAUDE_CONFIG_DIRenvironment variable moves all storage out of~/.claude. claude project purgedeletes a project's conversations and state right away, without waiting for the automatic cleanup.
Sources
- Claude Code docs: manage sessions (resuming, picker, names,
/export, transcript location) - Claude Code docs: the
~/.claudedirectory
Checked against Claude Code 2.1.285 on September 29, 2026.