chat-recall

How to view your Claude Code session history

Every Claude Code session is already written to disk, in full, as you work. Getting it back is three different jobs: resuming one, reading one, and finding the one you want.

The two commands that ship with it

claude --continueReopens the most recent session in the directory you are standing in. No picker, no choice.
claude --resumeLists recent sessions for that same directory and lets you pick one.

Both are scoped to the current working directory. That is the single fact that explains most of what follows.

Where the files are

One directory per project, one JSONL file per session, named by the session UUID:

on disk
~/.claude/projects/<project>/<session-uuid>.jsonl

The <project> segment is the working directory with every slash turned into a dash, so /home/user/code/example becomes -home-user-code-example. That naming is worth knowing, because it is why a renamed folder looks like lost history.

Reading one by hand

Each line is one JSON event, so the file is readable with anything that speaks JSONL. Filter on the message records and print the role with the content, and you get the conversation without the tool traffic wrapped around it.

Claude Code keeps four more things beside the transcript, and people usually only discover them when they go looking:

~/.claude/history.jsonlThe prompts you actually typed, across every project.
~/.claude/plans/Plan documents, flat, one file per plan.
~/.claude/tasks/<session-uuid>/Task lists, one set per session.
~/.claude/paste-cache/Long pastes, filed by content hash.

What the picker will not do

It resumes. It does not search. There is no built-in way to ask which session touched a given file, where an error was finally solved, or what was decided about an approach six weeks ago, and the list you are shown covers one directory in one tool.

So the honest summary is that Claude Code gives you a very good way to continue yesterday, and no way at all to find last month.

Searching instead of scrolling

across every session, every tool
$ chat-recall search "why did we drop the pooler"
  ranked, with the session each hit came from

$ chat-recall show <session-id> --full
  the whole conversation, printed

With the MCP server registered, the assistant runs those queries itself mid-task rather than waiting to be asked. The tool list is here.

The clock you are reading against

Transcripts are kept for 30 days by default, set by cleanupPeriodDays. Anthropic documents the retention as being there to enable session resumption, which is exactly what it is good for and exactly why the older end of your history is being trimmed while you read this. Where every tool stores its sessions has the paths for the other five.

Index what is already on disk When the history is not there at all

Questions

Is there a Claude Code session history viewer?Not a dedicated one. claude --resume lists recent sessions for the current directory and lets you reopen one, and claude --continue reopens the most recent without asking. Everything else means reading the JSONL files yourself or indexing them.
Where is Claude Code session history stored?In ~/.claude/projects/ as one JSONL file per session, named by the session UUID. The project folder is your working directory with each slash replaced by a dash, so /home/user/code/example becomes -home-user-code-example.
How do I see my Claude Code session history?Run claude --resume in the directory the work happened in. For anything outside that directory, or older than the picker shows, read the files under ~/.claude/projects/ or search an index over them.
How do I read a transcript file directly?Each line is one JSON event, so jq handles it. Filter on the message records and print the role alongside the content to get the conversation without the surrounding tool traffic.
Can I search my Claude Code history?Not with the built-in commands, which resume rather than search. chat-recall search queries every indexed session across every tool, and chat-recall show prints one in full.
How long does Claude Code keep session history?30 days by default, set by cleanupPeriodDays. The auto-memory directory is excluded from that sweep; the transcripts are not.

More notes

Claude Code session history disappeared: four reasonsFour things make Claude Code sessions vanish from the picker, and only one deletes anything. Check the other three before you conclude the work is gone.
Cursor chat history: where it lives and how to read itCursor keeps chat history in two different SQLite databases depending on whether you used the IDE or the CLI, and it has moved the IDE format three times.
The three kinds of MCP memory serverKnowledge-graph stores, note-takers and session indexes are three different products wearing one label. Which one you need depends on a single question.