Claude Code resume session: pick up where you left off

How to resume a Claude Code session with --continue, --resume and /resume, where sessions are stored, what comes back, and what to do after a limit or a crash.

· 6 min read

You closed the terminal. Your laptop restarted for an update. Claude Code hit the usage limit at 4 p.m. and you went home. Or it simply crashed. In every case the conversation isn't gone: Claude Code saves each session to disk as it goes, and one command brings it back with its full history. The only things to know are which command, where the sessions live, and what doesn't come back with them.

#How do you resume the last Claude Code session?

From the same folder you were working in:

claude --continue      # or: claude -c

It reopens the most recent session in the current directory, history included, and you carry on typing. Three details:

  • It looks only at this directory. Started the session in ~/code/larkspur-web and now in ~/code? It won't find it.
  • It skips sessions made by claude -p, by the Agent SDK, and sessions whose first prompt was /loop. claude -p --continue includes them.
  • If there's nothing to continue, it prints No conversation found to continue and exits.

#How do you pick an older session?

claude --resume        # or: claude -r

With no argument, this opens a picker of the sessions in the current worktree. Each row shows the name you gave the session, or its generated title, or a summary, or one of your prompts. Inside a running session, /resume opens the same picker and moves the current conversation to the background if it can.

The picker's keys:

KeyWhat it does
↑ ↓ or k jMove
EnterResume the highlighted session
SpacePreview the conversation
Ctrl+RRename it
/ or any letterSearch; you can paste a pull request URL to find the session that made it
Ctrl+AShow sessions from every project on this machine, and back
Ctrl+WShow sessions from every worktree of this repository
Ctrl+BOnly the current git branch, and back
EscLeave search, or the picker

Ctrl+A is the one people miss: when a session seems lost, it's usually in another folder.

#How do you resume a session by name or ID?

Give it a name when you start, or later:

claude -n billing-webhooks         # at startup
/rename billing-webhooks           # inside the session
claude --resume billing-webhooks   # straight back into it

A name is resolved across the current repository and its worktrees. If two sessions share it, claude --resume <name> opens the picker with the name filled in. The short default label you see on an unnamed session isn't a handle you can resume by; its generated title is.

Other ways in:

claude --resume 550e8400-e29b-41d4-a716-446655440000   # by session ID
claude --resume ~/.claude/projects/<project>/<id>.jsonl  # by transcript path
claude --from-pr 412                                      # sessions linked to PR #412

A session ID is looked up in the current project and its worktrees first, then in every other project. Running several sessions at once has more on naming habits that make this easy.

#Where does Claude Code store sessions?

Each session is one file:

~/.claude/projects/<project>/<session-id>.jsonl

<project> is your working directory with every character that isn't a letter or a digit turned into -, so /Users/ada/code/larkspur-web becomes -Users-ada-code-larkspur-web. Subagents write their own files in a folder named after the session. If you set CLAUDE_CONFIG_DIR, all of this lives under that directory instead of ~/.claude, which is why a second account has its own list of sessions (see using several Claude accounts).

The files are JSON lines, one entry per message, tool call or result. Their format is internal and changes between versions, so for a readable copy use /export, which writes the conversation as plain text.

#How long are sessions kept?

30 days by default. Claude Code deletes transcripts older than cleanupPeriodDays, and a deleted transcript can't be resumed. If you like to come back to old sessions, raise it in ~/.claude/settings.json:

{
  "cleanupPeriodDays": 120
}

The minimum is 1; 0 is refused.

#What comes back when you resume?

Most of the session, not all of it:

Comes backDoesn't
Every message, tool call and resultA tool call that was running when the session ended: it isn't run again
The model it was usingBackground shell commands and monitors
The permission mode (except bypassPermissions, which comes back as default)MCP servers passed with --mcp-config
The agent it ran as (--agent)--plugin-dir, --add-dir, --settings
Its goal and its scheduled tasks--tools, --allowedTools, --disallowedTools

The right column is the trap. If you started with flags, pass them again when you resume, or the session comes back with fewer tools than it had.

One more thing to expect: after a long break, the prompt cache has expired, so your first message re-reads the whole conversation at full price. On a long conversation Claude Code may ask "Resume this conversation?" and show what share of your 5-hour limit that first message alone would use. If it's large and you only need the outcome, a fresh session with a short summary is often the better deal; the context window explains the trade.

#How do you pick up after a usage limit or a crash?

After a usage limit. The best move is to leave the session open: on a claude.ai plan, recent versions wait and continue the task on their own after the reset (the autoContinueAtUsageLimit setting controls it). If you closed it, claude --continue after the reset and write "carry on where you stopped". Usage limits covers the window itself.

After a crash or a restart. Resume, then look before you leap. A tool call that was running when the process died is not re-run, so Claude doesn't know whether that npm test or that migration finished. Tell it:

The session crashed while you were running the tests. Check git status and
the diff, rerun the tests, and tell me where things stand before going on.

Thirty seconds of checking beats a second edit layered on a half-applied first one. If the files are in a bad state, undoing Claude Code changes shows how to get back to a clean point.

#How do you branch a session instead of continuing it?

When you want to try something without losing the current thread:

claude --continue --fork-session    # a copy of the latest session, with a new ID
claude --resume billing-webhooks --fork-session

Inside a session, /branch try-streaming does the same and keeps the original, which you can go back to with /resume. Don't resume the same session in two terminals at once: both write to one transcript, and messages can go missing. Fork it instead.

#Can you resume a session from another folder?

Yes, by ID: claude --resume <session-id> works from any directory. A session from another worktree of the same repository resumes in place (in your current directory if that worktree is gone). A session from an unrelated project isn't opened where you stand: Claude Code copies a cd and resume command to your clipboard so you can run it in the right folder. If a session should belong to a different folder from now on, /cd moves it.

#In Relais

Relais sessions are real Claude Code sessions, stored in ~/.claude/projects like the ones you start in a terminal, so claude --resume opens any of them, with or without Relais. In the app you don't resume anything: every conversation stays in the sidebar under its project, and you click it to carry on. A session stopped on the usage limit carries on by itself about a minute after the reset, with the computer kept awake; with a second Claude account signed in, it carries on there at once and says so ("Usage limit reached on A: going on with B"). See Projects, Seats and what Relais is.

Your AI team,
on your Claude plan.

$14.99 a month, everything included. On your Mac or on Linux, on your Claude Pro or Max plan. Cancel any time.