OmniscioGuidesClaude Code glossarySession
What a Claude Code session is, and how to pick one back up
A Claude Code session is one saved conversation, tied to the directory you started it in, with its own context window. A new session starts blank; only a resume brings the old conversation back.
What a session is
Anthropic's definition: a conversation tied to your current directory, with its own independent context window. Sessions can be resumed with claude -c, forked with --fork-session to keep the history under a new session ID, or run in parallel across terminals.
Each session is saved locally as you work: every message, tool use and result is written to a plaintext JSONL file under ~/.claude/projects/. That file is why a conversation can continue after you exit, and why a resume does not start from an empty window.
Sessions are independent: each new one starts with a fresh context window and none of the previous conversation. Two things bridge that gap, and both are worth knowing from the start: CLAUDE.md, which you write, and auto memory, which Claude writes for itself.
How sessions work in practice
Resuming one
From a shell, claude --continue reopens the most recent session in the current directory, and claude --resume opens the session picker. The picker shows the current worktree by default: Ctrl+W widens it to every worktree of the repository and Ctrl+A to every project on the machine.
Inside a running session, /resume switches to a different one. Resuming reopens the conversation under the same session ID and appends to it; it does not make a copy.
Forking one
A fork copies the history into a new session ID and leaves the original untouched, so you can try a second approach without losing the first. From inside a session the command is /branch, optionally with a name; from the shell it is --fork-session combined with --continue or --resume.
Starting fresh without losing the old one
Running /clear starts a new session. The previous one stays stored and is available through /resume, so clearing is not deleting.
Running several at once
Sessions are tied to directories, which is why parallel sessions use git worktrees: each gets its own checkout and its own branch, so two agents can work without editing the same file.
A small example
You stop for lunch halfway through a refactor. The next morning, in the same directory:
claude --continueTo try a second approach without touching that thread, fork it with a name instead: /branch second-attempt. The confirmation prints both session IDs, the original stays in the picker, and /resume second-attempt brings the fork back.
Related terms
- Transcript: the stored record of a session.
- Context window: the working memory one session fills.
- Compaction: what happens when that window fills.
- Worktree: how two sessions run side by side.
- Subagent: a worker inside a session, not a second session.
- Back to the glossary.
The full guide to this term is how to resume a Claude Code session: the flags, the picker, and what does and does not come back.
Keep every session in one window
The features page lists what Omniscio does with several Claude Code sessions at once, which is where resuming the right one stops being a directory hunt.