checkpoint: use compact_transcript path field instead of boolean · Entire

checkpoint: use compact_transcript path field instead of boolean

0eaaf1b→main·

Replace the has_compact_transcript boolean with a compact_transcript string holding the path to transcript.jsonl, placed alongside the transcript (full.jsonl) pointer in the root metadata.json sessions[] entries. Omitted when no compact transcript was written. This mirrors the existing transcript pointer rather than signalling presence separately.

Co-Authored-By: Claude Opus 4.8 noreply@anthropic.com

Sessions

d1553195a011View transcript

Changes

5

494 unmodified lines
MCLAUDE.md+1/-1
380 unmodified lines

SessionFilePaths Struct

type SessionFilePaths struct {
    Metadata string `json:"metadata"`
    Transcript  string `json:"transcript,omitempty"`
    ContentHash string `json:"content_hash,omitempty"`
    Prompt      string `json:"prompt"`
    HasCompactTranscript bool `json:"has_compact_transcript,omitempty"`
    CompactTranscript string `json:"compact_transcript,omitempty"`
}
403 unmodified lines

// Write transcript. The pointer targets full.jsonl, which CLI // rewind/resume/explain read by filename. The compact transcript.jsonl is // also written into the tree (so it is pushed) and signalled to external // readers via the HasCompactTranscript flag below.

79 unmodified lines
// Root metadata.json still points at full.jsonl; the compact transcript is
// written into the tree (and pushed) and flagged via has_compact_transcript.
215 unmodified lines

It is written into the checkpoint tree and pushed alongside full.jsonl. The root metadata.json sessions[].transcript pointer keeps targeting full.jsonl; when a compact transcript was generated the session entry also carries a compact_transcript path pointing at transcript.jsonl (omitted otherwise) so external readers can find it next to full.jsonl.

{
"metadata": "/ab/c123def456/0/metadata.json",
"transcript": "/ab/c123def456/0/full.jsonl",
"compact_transcript": "/ab/c123def456/0/transcript.jsonl",
"content_hash": "/ab/c123def456/0/content_hash.txt",
"prompt": "/ab/c123def456/0/prompt.txt",
"has_compact_transcript": true }