Expand description
Claude Code: ~/.claude/projects/<encoded-cwd>/<session>.jsonl.
Claude’s on-disk payload is already the Anthropic Messages shape, so the
codec is close to the identity — it is the reference every other harness
normalizes toward. Each line is one Record; user/assistant lines carry
an ApiMessage whose content is a string or an array of Anthropic
blocks. Non-message lines (summaries, titles, snapshots) are preserved
verbatim in Record::Other so native ↔ disk stays lossless even though
the codec ignores them.
Structs§
- ApiMessage
- The wrapped Anthropic message.
contentis preserved as raw JSON (string or block array); the codec is what turns it into typedBlocks. - Claude
Code - The Claude Code harness marker.
- Claude
Store - Reads and writes Claude Code sessions under a projects root (default
~/.claude/projects). - Entry
Line - A
userorassistantline: the per-line envelope plus the wrapped Anthropic message. Unknown envelope keys collect inextra. - Summary
Line - A
summaryline.
Enums§
- Record
- One JSONL line. Known line types are typed; anything else is kept whole in
Record::Otherso the file round-trips without loss.