Where each harness keeps the record of past sessions, how to get back into one, and how to keep, export or remove them. Every record type and field inside a transcript is on the Transcript format page. Automatic notes carried between sessions are on the Memories page.
What is saved
| Question | Claude Codechecked at 2.1.299 |
|---|---|
| Where sessions are saved | Each session is saved as Moving a session with |
| Subagent and forked sessions | Subagent transcripts are written beside the parent at Compacting the main conversation does not alter subagent transcripts; subagents log their own Subagent transcripts written before 2.1.307 can show placeholder token usage and empty stop reasons. |
| Prompt history | Prompt history is a separate file, Large pastes in recalled prompts are stored in |
Getting back to a session
| Question | Claude Codechecked at 2.1.299 |
|---|---|
| Resume or continue |
Flags such as Resuming a background session that is still running attaches to it instead (v2.1.285+). Since 2.1.309, a name set with |
| Find a past session |
Sessions created with |
| Export or share | Partly
|
| Read sessions from code | The Agent SDK exposes |
Keeping and removing
| Question | Claude Codechecked at 2.1.299 |
|---|---|
| How long they are kept | Current documentation describes 30-day default retention, minimum cleanupPeriodDays of 1, and guarded/paused sweeps when settings cannot be determined. Desktop/Cowork transcripts have separate exceptions and desktopSessionCleanupPeriodDays. Orphaned/superseded transcripts and session sidecars are separate artifacts; removing a background process with claude rm does not delete its transcript.
The sweep is skipped with |
| Don't save this session | Current documentation supports CLAUDE_CODE_SKIP_PROMPT_HISTORY to suppress transcripts and prompt history in all modes, and --no-session-persistence for -p runs. CLAUDE_CODE_TRANSCRIPT_LOCAL_GC separately limits non-interactive/SDK transcript growth. The TypeScript SDK offers persistSession:false; this is not a Python SDK option. The Python Agent SDK has no
|
| Cloud sync and upload | Local CLI transcripts stay on your machine by default and Turn Remote Control auto-connect off with Teleport is one-way: work continued in the terminal isn't pushed back to the cloud session. |
Notes and sources
Claude Code, 25 sources
- Claude Code says the entry format is internal and can change between versions.
- Prompt history (~/.claude/history.jsonl) is a different artifact.
- 2.1.304 adds earlier tool names to compaction summaries in Ctrl+O, avoids storing auto-mode classifier context with every request, and fixes local transcript GC dropping messages when disk fills during trimming. Mods settings.read can impose a cleanupPeriodDays ceiling used by retention sweeps. These are publisher claims, not a new transcript schema audit.
- 2026-10-26 automatic-approval audit: publisher docs show auto-mode denials and reasons alongside tool calls in the conversation/Ctrl+O viewer. This is not evidence for a stable JSONL classifier verdict record or a complete audit of approvals.
- 2.1.304 publisher changelog says classifier context is no longer saved with every request. Older transcripts may therefore contain more classifier context. Remaining private metadata/decision fields are not exhaustively specified or claimed absent.
- For documented machine-readable classifier decisions use separately configured OpenTelemetry tool_decision: classifier_verdict and permission_mode (2.1.301+), and optional classifier_category with OTEL_LOG_TOOL_DETAILS=1. safety_event (2.1.307–2.1.311; no longer sent from 2.1.312) recorded blocked/prompted checks, not every successful classifier allow. Telemetry is not the session transcript. See docs/research/automatic-approval.md.
- 2.1.311 publisher fixes out-of-order or retracted messages retained by -p/SDK transcripts. JSON/stream-json now escape DEL, C1 controls and Unicode format characters as \uXXXX without changing parsed values. 2.1.310 fixes cleanup of recent files with very large cleanupPeriodDays; a large value does not disable retention.
- 2.1.312 publisher fixes a rare case where the first reply after a terminal resume could be missing when the session was resumed again, and makes transcripts name the effort level in force rather than a newly picked level the model has not applied yet. Not a new JSONL schema audit.
- Documentation checked 2026-11-15 against latest 2.1.325 / stable 2.1.311 release metadata. Detailed internal shapes remain the historical 2.1.310 survey (high-level observedVersion 2.1.299); readable implementation JavaScript has now been located in the installed native executable; the 2.1.325 source supplement traces selected fields and storage policies. The four-field implementation supplement is not a complete 2.1.325 schema or controlled runtime verification.
- 2026-11-15 aggregate-only existing-record survey found 1,769 version-matched 2.1.325 records across five files. Ten record/subtype families and top-level/message field types were retained without content. Unversioned metadata in these mixed files is counted separately and cannot be attributed to 2.1.325. This supplements the 2.1.310 full survey; it is not a controlled writer/resume probe or an exhaustive current schema.
- Installed 2.1.325 source correction: the native executable embeds readable JavaScript alongside bytecode/string tables. Static extraction recovered transcript constructors, write routing and GC policy tables plus four field definitions. See docs/research/evidence/claude-transcript-source-2.1.325.json and its partial JSON Schema. Keep the older full catalogue version pin; these are explicitly current source supplements.
- Expanded 2.1.325 installed-source supplement: 46 write/read/GC policy registrations plus repl-mode special handling, six previously uncatalogued metadata families, and actual cost-state validator projection with eight passing isolated checks. Do not treat constructor candidates or normalized-reader shapes as complete runtime input schemas.