CCViewer / Help Center / Where sessions are stored

Where Claude Code Sessions Are Stored: Paths & Retention

Updated · CCViewer Help Center · Applies to Claude Code 2.x

For local Claude Code sessions, the default transcript location is ~/.claude/projects/<project>/<session-id>.jsonl. A custom configuration directory changes the base path. This local layout is not a claim that all Claude Code interfaces or model requests stay on your machine.

Transcript, prompt history and configuration

Default pathPurpose
~/.claude/projects/Project transcripts and related project data
~/.claude/history.jsonlPrompt history; not a replacement for a conversation transcript
~/.claude/settings.jsonUser settings
~/.claude.jsonState/configuration outside the .claude directory

On Windows, the default base is %USERPROFILE%\.claude. See the official directory documentation for environment and version differences.

Records a viewer can read

JSONL stores one JSON value per line. CCViewer recognizes user and assistant messages, tool calls and results, and some system and cost records. Fields such as timestamp, sessionId, cwd and message.usage may be present. The log is an evolving implementation format: every record is not guaranteed to contain every field.

Retention and missing history

Transcripts are not a permanent backup. Claude Code has retention settings and modes that disable persistence. Cleanup behavior can vary by version and interface; consult the application-data documentation for the applicable settings. Compaction and missing records also limit what can be reconstructed.

Back up and read safely

Copy the transcripts you need to an access-controlled backup before migrating or clearing data. They can contain source code, paths and command output. Keep original files even when importing into a browser library, which can be cleared by browser storage controls.

CCViewer reads the files locally. Its hosted site also loads Clarity analytics and recordings; a local transcript does not imply that the hosted viewer or Claude Code model calls are network-free.

Sources and verification

Replay your Claude Code sessions visually with CCViewer
Session files are parsed and rendered locally in your browser. The hosted site automatically loads Microsoft Clarity to record page interactions. Offline copies do not load analytics.

FAQ

Is history.jsonl the full transcript?
No. Prompt history and project conversation transcripts serve different purposes.
Does local storage mean Claude Code is offline?
No. Local transcript storage is separate from model requests and cloud or remote session features.