Where Claude Code Sessions Are Stored: Paths & Retention
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 path | Purpose |
|---|---|
~/.claude/projects/ | Project transcripts and related project data |
~/.claude/history.jsonl | Prompt history; not a replacement for a conversation transcript |
~/.claude/settings.json | User settings |
~/.claude.json | State/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
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.