What sessions are
When you start Claude Code, it creates a new session with a random UUID. Every message you send, every assistant response, and every tool call is appended to a JSONL transcript file in real time. Sessions are stored under:The root of all session storage is
~/.claude/projects/. This directory is created automatically on first use.Continuing the most recent session
Use-c / --continue to re-open the most recent session for the current directory without picking from a list:
Resuming a specific session
Use-r / --resume to resume any saved session.
- Interactive picker
- Session ID
- Slash command
Run You can also pass a search term to filter the list:
--resume with no argument to open an interactive picker showing recent sessions for the current project:Session titles
Each session is shown in the resume picker with a title. Titles are generated automatically from the first meaningful message you sent in that session (the first prompt that is not a tool notification or system message). You can set a custom display name for a session at startup with--name:
/resume and in the terminal tab title.
Clearing session history
Run/clear (aliases: /reset, /new) inside the REPL to discard the current conversation history and start fresh within the same terminal session. This is equivalent to beginning a new session without exiting Claude Code.
/clear frees up context and starts a new conversation, but does not delete the previous session transcript from disk. You can still resume it later with /resume.Exporting a session transcript
Use/export to save the current conversation to a file or copy it to the clipboard:
Disabling session persistence
To run a session without saving it to disk at all, pass--no-session-persistence together with --print:
~/.claude/ and cannot be resumed.
Multiple concurrent sessions
You can run multiple Claude Code instances at the same time in different terminals. Each instance creates and manages its own session independently. Sessions from different working directories are stored in separate project subdirectories, so there is no conflict. When running multiple instances in the same directory, each gets a unique UUID and its own JSONL file.Session storage layout
.jsonl file contains one JSON object per line. Each line is a message — user turn, assistant turn, tool call, or system event — appended as the session progresses.