Claude Code guide: resuming a session

How to resume a Claude Code session

A Claude Code session lives on disk as soon as it starts, so resuming is not a recovery feature. It is the normal way to continue a conversation in a new process, whether you closed the terminal on purpose or something closed it for you.

Anthropic

On Claude Code

Resume takes the session id

Continuing a conversation means starting Claude Code again with the id of the session you want. The id is the filename of the transcript, minus the .jsonl extension.

It happens once, at start

The resume is done when the process starts, not per turn. Everything after that is one continuous run, which is why resuming is cheap even on a long conversation.

Changes made elsewhere need a restart

Because resume happens once, a turn that a terminal appended to the transcript after your process started is not picked up until the next start. Codex re-reads before every turn, Claude does not.

The session id is stable

Continuing a session keeps its id, so the transcript keeps growing in the same file rather than forking into a new one.

Finding the id

List the project directory under ~/.claude/projects and sort by modified time. The most recently touched .jsonl file is the session you were last in.

Compare

How each engine picks a conversation back up

 Claude CodeCodex CLIGrok CLI
Resume mechanismA flag on the next runAn explicit resume callSession state re-read per turn
HappensOnce, at process startBefore every turnBefore every turn
Picks up terminal editsAt the next process startYes, every turnYes, every turn
Identified bySession idThread id plus working directorySession id
Cost of resumingCheapCan be slow on a long threadCheap

Termdeck drives all three from one console, so the differences above stop being three separate habits to remember.

FAQ

Claude Code resuming a session, answered

Where do I find my Claude Code session id?

It is the name of the transcript file. Look under the project directory in ~/.claude/projects and take the filename without the .jsonl extension. The most recently modified file is the session you were last working in.

Does resuming a session cost tokens?

Resuming re-establishes the conversation, so the prior context is in play again. That is what makes the continuation coherent, and it is why a very long session gets more expensive per turn than a fresh one on the same task.

Can I resume a session on a different machine?

Only if the transcript file is there. The session lives entirely in the JSONL file on the machine that ran it, so copy the file across first, into the matching project directory.

Why does my resumed session not show a turn I ran in the terminal?

Claude Code reads the transcript when the process starts, not before every turn. A turn appended by another process after yours started is not visible until you start again.