CCViewer / Help Center / Where sessions are stored

Where are Claude Code session histories stored?

Updated 2026-10-12 · CCViewer Help Center · Applies to Claude Code 2.x

Short answer: everything is stored locally under ~/.claude/projects/ as JSONL files — no cloud sync, no account-based session history.

Directory layout

~/.claude/
├── projects/                     # ← all session history lives here
│   ├── -Users-you-Documents-app/ #   one directory per project (path-mangled)
│   │   ├── 9a1b2c3d-….jsonl     #     one file per session
│   │   └── 7c2d3e4f-….jsonl
│   └── -home-you-shop-api/
│       └── …
├── claude.json                   # global config (MCP, theme, project state)
└── … (cache, logs, stats and other auxiliary files)

Naming rule for project directories: every /, _ or other non-alphanumeric character in the project path becomes a -. All sessions of one project therefore cluster in one directory — which is also how viewers "group by project".

What’s inside a JSONL file

JSONL = one independent JSON object per line. A session file records the full conversation in chronological order. Main entry types:

typeContent
userYour input (text / images) and tool results sent back
assistantModel replies: text, thinking blocks, tool_use calls and token usage
systemSystem events (hooks, etc.)
summary / ai-titleSession summary and auto-generated title
cost-stateCost & usage snapshot (total cost, lines +/- , API duration)

Each entry also carries metadata: timestamp, cwd (project path), gitBranch, version, sessionId, and more. In other words, the history file is more complete than what the terminal shows — reasoning, raw tool parameters and results, and token consumption are all in there.

What this means for you

How to read this history comfortably

Reading raw JSONL is a slog. Open the directory with CCViewer (whole-folder drag & drop supported): sessions group by project, and Markdown, thinking blocks, tool calls and cost stats are all rendered graphically — with parsing happening only in your browser, preserving the "data never leaves this machine" property.

Replay your Claude Code sessions visually with CCViewer
Open the page and drop in a .jsonl file — or the whole ~/.claude/projects/ folder. Markdown rendering, thinking blocks, tool calls, token & cost stats, all processed locally in your browser. Nothing is ever uploaded.

FAQ

Is Claude Code history uploaded to Anthropic servers?
The session files themselves stay in local ~/.claude/projects/ and are not stored separately in the cloud. Of course, while a conversation is happening its content is processed via the API — that’s inherent to using the model — but the history files are local files you fully control.
How do I delete session history?
Just delete the corresponding .jsonl file (or the whole project subdirectory); the session then disappears from the resume list. Make sure you don’t need a backup first.
Are ~/.claude/projects and ~/.claude.json the same thing?
No. ~/.claude.json (or claude.json) is the global configuration file (MCP servers, theme, etc.); session history lives in the .jsonl files under ~/.claude/projects/.