Part ofWhat Is Claude Code? The Complete Guide
In This Article
6 sectionsQuick answer
Claude Code sessions are saved automatically as you work, so you never lose a conversation. Resume the most recent one in a folder with `claude --continue`, or run `claude --resume` to open a picker and jump back into any past session. Each session is stored locally as a JSONL transcript, and `/clear` starts a fresh one without deleting the old.
Every conversation you have with Claude Code is a session, and knowing how to move between them is what turns the tool from a one-shot chat into a persistent workspace. We hop between Claude Code sessions constantly — one per feature, one for a bug hunt, one for docs — and pick each back up exactly where we left it. Below is how sessions work, how to resume and list them, where they live on disk, and how to manage them so your context stays sharp and your bill stays low.
What Claude Code sessions are
A session is a single continuous conversation with Claude Code, scoped to the directory you started it in. It holds the full history — your prompts, Claude's responses, every file read and edit, every command run. That history is what lets Claude remember what it did three steps ago.
Crucially, Claude Code sessions save continuously. You don't press save; the transcript is written to disk as you go, so if you close the terminal, your laptop dies, or you run /clear, the conversation is still there to resume. This is the mental model that makes everything else make sense: sessions are durable by default, not disposable.
How to resume a Claude Code session
There are two commands for getting back into a session, and picking the right one depends on whether you want the latest one or a specific one:
| Command | What it does | Use when |
|---|---|---|
claude --continue (or claude -c) | Resumes the most recent session in the current directory | You're picking up where you just left off |
claude --resume (or claude -r) | Opens an interactive picker of past sessions | You want an older session, or you have several |
claude -r "<session-id>" | Jumps straight to a specific session by ID | You're scripting or know the exact session |
/resume (inside a session) | Opens the same picker without leaving Claude Code | You're already running and want to switch |
--continue is the one you'll use most — it's the "keep going" button. Reach for --resume when you juggle multiple Claude Code sessions and need to hop back to one from earlier. You can also add --fork-session to branch a copy instead of continuing the original, which is handy when you want to try a different approach without losing the thread.
How to list your Claude Code sessions
To see what you can resume, run claude --resume with no arguments (or /resume inside a session). That opens the picker — the fastest way to list your Claude Code sessions. Each row shows:
- The session name if you set one, otherwise the conversation summary or your first prompt
- Time since last activity, so you can spot the one you want
- Message count, a rough gauge of how deep the session went
- The git branch it was running on
The picker is scoped to your current project directory, so you only see sessions relevant to the code you're in. That keeps the list short and the right session easy to find, even if you've run dozens of Claude Code sessions across different repos.
Where Claude Code sessions are stored
Every session is a plain-text JSONL transcript on your machine. By default they live at:
~/.claude/projects/<project>/<session-id>.jsonl
Here <project> is your working-directory path with non-alphanumeric characters replaced by -, and <session-id> is the session's unique ID. Because they're plain JSONL, your Claude Code sessions are greppable, scriptable, and backup-friendly — you can search old transcripts for a command you ran last week or feed them into your own tooling.
| Fact | Detail |
|---|---|
| Format | JSONL (one JSON object per line) |
| Location | ~/.claude/projects/<project>/<session-id>.jsonl |
| Scope | Per working directory |
| Saved | Continuously, as you work |
Managing Claude Code sessions: clear, fork, and cost
Good session hygiene is mostly about knowing when to start fresh. Three habits matter:
- Use
/clearbetween unrelated tasks./clearends the current session's context and starts a clean one — the old session stays saved to disk, so you lose nothing but the baggage. This is the single biggest lever on both Claude's focus and your bill, because a long session re-sends its entire history every turn. - Fork when you want a branch.
claude --resume --fork-sessioncopies a session so you can explore a different direction without touching the original — the equivalent of a git branch for your conversation. - Watch cost on long sessions. The longer a session runs, the more tokens each turn costs, since the whole transcript is re-sent. If you're on the API, clear often; we break the math down in our Claude Code cost guide.
A stale, sprawling session makes Claude slower and pricier and its answers worse. Starting a fresh session for each new task — and resuming the right old one when you return — is the whole discipline. It pairs naturally with plan mode for structured work and with your statusline, which can surface the active session at a glance.
Take Claude Code sessions across devices and automation
Sessions aren't locked to the terminal you started them in. Two extensions are worth knowing:
- Continue a session from another device. Claude Code's Remote Control lets you pick up a local session from your phone or another machine — kick off a long refactor at your desk, then check on it from the couch. It's the same durable transcript; you're just attaching a new front end to the running session.
- Drive sessions from the SDK. If you build on top of Claude Code, sessions are first-class: each
query()call is linked by a session ID, and aresumeoption reattaches to an existing one. That's how you script multi-step agents that remember prior turns instead of starting cold every run.
Anthropic's full session reference documents every flag, including how naming a session makes it easier to spot in the picker later. A quick habit that pays off: give a session a memorable name when you know you'll return to it — a migration, a long investigation — so your list of Claude Code sessions reads like a table of contents instead of a wall of near-identical summaries.
The throughline across all of it is the same: your work is a durable, resumable session, not a throwaway chat. Once that clicks, you stop losing context. You start a session per task, name the ones that matter, resume the right one when you come back, and clear the rest — the discipline that makes Claude Code feel less like a chatbot and more like a workspace that remembers what you were doing.
Frequently Asked Questions

Written by
InnovateTechie
Writing about Claude and the Anthropic toolkit — models, Claude Code, pricing, features, and fixes, in clear, practical, hands-on guides tested by daily use.
View all posts →




