Resume a Claude Code session: --continue, --resume and fixes
Resume a previous Claude Code session with claude --continue in the same folder, or claude --resume <name or ID>. Transcripts sit in ~/.claude/projects.
Contents
To resume a previous Claude Code session, cd to the folder you worked in and run claude --continue, which reopens the latest session there, or claude --resume to pick from a list. claude --resume <name or ID> skips the list. Claude Code writes each session to a local .jsonl file as you go, so you can come back after closing the terminal or running /clear.
Every command and path here comes from Anthropic's sessions docs and CLI reference, read on 22 October 2026 and again on 25 October 2026.
The ways back into a session#
| Command | What it does |
|---|---|
claude --continue (-c) |
Reopens the most recent session in the current directory |
claude --resume (-r) |
Opens the session picker |
claude --resume auth-refactor |
Resumes the session with that name |
claude --resume <session-id> |
Resumes that session, from any directory on this machine |
claude --resume /full/path/to/<id>.jsonl |
Resumes the session stored in that transcript file |
/resume |
Switches to another session from inside a running one |
claude --from-pr 123 |
Opens the picker filtered to sessions linked to that pull request |
claude -r auth-refactor "Finish this PR" resumes and sends a prompt in one line. With --fork-session you continue a copy and the original stays as it was; /branch does the same from inside a session.
Name sessions so you can find them#
Claude Code titles an unnamed session from your first prompt, with a background request to a small Haiku-class model, and a claude -p run started from a script gets no title. A name of your own is easier to type back:
| When | How |
|---|---|
| At the start | claude -n auth-refactor |
| During the session | /rename auth-refactor (the name then shows on the prompt bar) |
| In the picker | Highlight the session and press Ctrl+R |
claude --resume auth-refactor then works from anywhere in that repository and its worktrees. If two sessions share the name, the picker opens with the name already in its search.
The picker's shortcuts#
Inside claude --resume:
- type to search, and press Space to preview a session
- Ctrl+W widens the list to all worktrees of this repository
- Ctrl+A widens it to every project on this machine
- Ctrl+B filters to the current git branch
- a pasted GitHub, GitLab or Bitbucket pull request URL finds the session that created it
- a session from an unrelated project isn't opened in place: Claude Code copies a
cdand resume command to your clipboard
Where Claude Code keeps your sessions#
Each session is one file on your computer, ~/.claude/projects/<project>/<session-id>.jsonl. Claude Code builds <project> from your working folder's path by turning every character that isn't a letter or digit into -, so /Users/you/code/app becomes -Users-you-code-app.
Each line of the file is one JSON object: a message, a tool use or a metadata entry. A folder name longer than 200 characters is cut to 200 with a hash of the full path added.
| To | Use | Set in |
|---|---|---|
Move everything off ~/.claude, sessions included |
CLAUDE_CONFIG_DIR |
Environment variable |
| Change the 30-day retention | cleanupPeriodDays |
settings.json |
| Save nothing for one run | --no-session-persistence |
CLI flag, with -p |
Anthropic says the file format is internal and changes between versions. A script that needs a session should use /export or claude -p --resume <id> --output-format json, not parse the JSONL.
Why a resume fails, and the fix#
You're in a different folder#
--continue only looks at the current directory. Start in ~/code/app, move to ~/code/app/web, and it finds nothing or the wrong session. cd back, or run claude --resume and press Ctrl+A.
It was a claude -p or SDK session#
Sessions started with claude -p or the Agent SDK are left out of the picker and of a plain claude --continue, and so is any session whose first prompt was a /loop command. claude -p --continue does include them, and claude --resume <session-id> opens one directly. The headless mode guide shows how to capture the ID.
It lives under another config folder#
With two accounts on CLAUDE_CONFIG_DIR (two Claude Code profiles on one machine), each profile has its own projects folder, and a session started under one is missing from the other's picker. Pass its full transcript path to claude --resume instead.
It's on another computer#
Transcripts are local files, so a session from your desktop isn't on your laptop. Copy the .jsonl across and resume it by path (which folders to copy, and what to do when the project path changed), or work on one machine. Moving for good means your settings, MCP servers and sign-in come along too (migrate Claude Code to a new computer).
A session that ran in Anthropic's cloud works the other way round: claude --teleport, run from a checkout of the same repository, loads it into your terminal (Claude Code teleport).
It was cleaned up#
Sessions older than cleanupPeriodDays (30 by default) age out, and claude purge removes a project's transcripts on purpose. That session can't come back. Raise cleanupPeriodDays for the next ones (the values that work, and why 0 fails validation).
"No conversation found with session ID"#
The full message reads No conversation found with session ID: <session-id>. Given an ID, Claude Code checks the current project and its worktrees, then every other project on this machine, and that second search resolves the ID only when exactly one other project holds it. Besides the causes above, then, a hand-copied duplicate makes it report not-found rather than pick a copy. Delete the extra copy, or resume by path.
"Your most recent conversation is running in the background"#
--continue won't open a background session that's still running. Attach to it from claude agents, or run claude --resume and pick another.
It resumed, but something's missing#
A resumed session brings back the conversation, the model and usually the permission mode. Not every launch flag comes back: pass --mcp-config, --settings, --plugin-dir, --fallback-model and --add-dir again if the session needed them, and folders added mid-session with /add-dir are gone too. A compacted session opens at a Conversation compacted row and carries on from the summary, not the full history. A tool call that was cut off by a crash isn't rerun; Claude is told to check whether it took effect first.
Resuming on another account#
On the same computer and config folder the transcript is a plain file. After /login with a second account, claude --continue picks up the same conversation on the new account's usage. The by-hand steps, including across config folders, are in keeping the same chat across Claude accounts.
After a break longer than the prompt-cache lifetime, your first message reprocesses the full context (Anthropic's cost docs). Resume a long session after a few hours and that message is one large request; /compact doesn't get round it, because compacting also reads the whole conversation. On Pro and Max, that case can open a "Resume this conversation?" dialog; its estimate is the share of your 5-hour limit the saved conversation alone would use, charged with your first message after Resume.
How Shuriken keeps chats findable#
Shuriken is a harness that runs Claude Code and other coding agents on your own computers and servers. Its chats don't have to be found again:
- A chat's history lives on the computer that ran it, and the chat list follows you to your other computers and to your phone's browser. Our cloud stores no chats.
- With hot swapping, Shuriken moves a chat to another of your accounts when one nears its limit (Switch at, 99% by default), inside the running chat, without a resume. Only add accounts you own and are entitled to use; providers' terms may not allow sharing a subscription sign-in.
- You can run a chat on another of your computers; it stays the same chat, with its history, and carries on there.
- Add project › Import from… brings your projects and their past chats in from Claude Code or Codex (Claude Code and Codex in one project).
- A chat tab's Open in terminal opens the chat in Claude Code's own interface.
Download Shuriken to keep every chat in one list.
Sources
- Claude Code docs: Manage sessions (accessed 22 October 2026)
- Claude Code docs: CLI reference (accessed 22 October 2026)
- Claude Code docs: Run Claude Code programmatically (accessed 22 October 2026)
- Claude Code docs: Manage costs effectively (accessed 22 October 2026)
Frequently asked questions
How do I resume my last Claude Code session?
Run claude --continue (or claude -c) in the same folder you worked in; it reopens that directory's most recent conversation. For an older one, run claude --resume and pick it from the list.
Where are Claude Code sessions stored?
On your own computer, one JSONL file per session at ~/.claude/projects/<project>/<session-id>.jsonl. <project> is the working folder's path with every non-alphanumeric character turned into a dash, and CLAUDE_CONFIG_DIR moves them.
Why does claude --resume say no conversation found?
No stored transcript matches the ID. The usual causes: the session was made under another config folder or on another computer, it was older than the 30-day retention, or you copied the transcript by hand and there are now two.
How long does Claude Code keep old sessions?
30 days by default. The cleanupPeriodDays setting in settings.json changes it.
Can I resume a session on a different Claude account?
On the same computer and config folder, yes. The transcript is a local file, so a session resumed after /login continues on the new account. Across config folders you resume it by its transcript path.