Claude Code keeps saving your conversations locally, so you can go back to one after quitting or running /clear. You use it to continue yesterday's work without explaining it from scratch.
From actually using it
While building this site, I put a claude --resume <session-id> line at the top of CLAUDE.md and used it to get back to an earlier session.
How it works
A session is a saved conversation tied to a project directory. It is saved continuously to a local history file as you work. The default location is ~/.claude/projects/<project>/<session-id>.jsonl. History is cleaned up according to the default 30-day retention setting (cleanupPeriodDays).
When you resume, the conversation history, the model you were using, agents, the active goal, and scheduled tasks that have not expired are restored. If the session was compacted, it opens from the content after the last compaction summary. Startup flags such as --mcp-config, --settings, --plugin-dir, and --add-dir are not restored, so you have to pass them again. Standard settings files such as settings.json are re-read at startup.
How to use it
- claude --continue: opens the most recent session in the current directory right away. If there is none, it prints "No conversation found to continue" and exits.
- claude --resume: opens the session picker.
- claude --resume <name or ID>: opens a session directly by name or ID. An ID is also found from other directories.
- /resume: switches to a different session from inside a running session. /resume <name> also works.
- claude --from-pr <number>: shows only sessions linked to that PR in the picker.
claude --continue claude --resume claude --resume auth-refactor claude -n auth-refactor
Naming sessions and the picker
You can name a session at startup with claude -n <name>, during a session with /rename <name>, or in the picker with Ctrl+R. Once it has a name, you can return with /resume <name> later. Even without a name, a title summarizing your first prompt is generated, and you can resume with that. The default display name, though (the directory name plus two characters, such as my-app-3f), is not a handle for resuming.
If a name matches several sessions, claude --resume <name> opens the picker with the name filled in as the search term. /resume <name> gives an error in that case.
The picker shortcuts are: Enter to resume, Space to preview, Ctrl+R to rename, Ctrl+A for all projects, Ctrl+W for all worktrees, Ctrl+B for the current branch only, and typing to search.
How it relates to nearby features
- /clear: starts a new conversation but saves the previous one so you can return with /resume. If you give it a name, as in /clear <name>, the previous conversation gets that name.
- /compact: summarizes the same conversation. It does not create a new session; the same session continues.
- /branch or --fork-session: copies the conversation so you can try a different approach. The original session stays as it is.
- If you open the same session in two terminals without forking, messages get mixed into a single history.
- Sessions created with -p or the Agent SDK are left out of the picker and --continue. You can still resume them by session ID.
Real examples
You want to continue yesterday's auth refactor this morning, in the same folder
claude --continue
The most recent session in the current directory opens, and yesterday's conversation is restored as it was. If you have done other work in that folder since, the most recent session may be that one.
You switch between several tasks and cannot tell which session is which in the list
Start the task with claude -n payment-bug, then the next day run claude --resume payment-bug
If the name matches exactly one session, it opens right away without the picker. If the name matches several sessions, the picker opens with the name filled in as the search term.
You ran /clear to change topics, and now you need the earlier conversation back
/resume
Pick the earlier conversation in the picker and you are back in it. It is much easier to find if you named it with /rename before clearing, or cleared with a name in the form /clear <name>.
Common mistakes and when not to use it
- Believing --continue always opens the session you want. It only opens the most recent session in the current directory. If you alternate between tasks, name them and use --resume <name>.
- Assuming startup flags are restored. Flags such as --mcp-config, --settings, and --add-dir have to be passed again.
- Trying to resume by the default display name (something like my-app-3f). It is not a handle for resuming.
- Opening the same session in two terminals without forking. Messages get mixed into one history. To split them, use --fork-session.
- Assuming history is kept forever. It can be cleaned up under the default 30-day setting.
FAQ
What is the difference between /resume and claude --resume?
/resume is a command that switches to another session from inside a running session. claude --resume is a way to pick a session while starting Claude Code from the terminal.
Where do I find a session ID?
The history file name has the form ~/.claude/projects/<project>/<session-id>.jsonl. If you give sessions names, you can resume without an ID, which is easier.
Is the permission mode restored when I resume?
From the terminal, with --continue or --resume by name or ID, the previous permission mode is restored (with some exceptions). If you open a session from the picker, only a session that ended in plan mode is restored to plan mode. If you pass --permission-mode, that value takes precedence.
Checked against the official docs on 2026-10-30. Sources: Claude Code docs: Manage sessions, Claude Code docs: Commands, Claude Code docs: Common workflows. How we write