Store compact transcript.jsonl in v1 checkpoints, point metadata at it

main

Commit

computermode3mo ago

Committed checkpoint writes now generate a compact transcript (transcript.jsonl) from the full transcript via transcript/compact and store it in the session directory next to full.jsonl, so it is pushed with the entire/checkpoints/v1 branch. The root metadata.json sessions[].transcript pointer targets transcript.jsonl when it was generated and falls back to full.jsonl otherwise (unparseable or external-agent transcripts, checkpoints from older CLI versions).

Unlike the removed v2 (cumulative compact plus compact-unit offset), the stored compact is pre-sliced to the checkpoint's own portion: compact.Compact runs with StartLine = checkpoint_transcript_start. v1's checkpoint_transcript_start must keep full.jsonl units for CLI readers, so a pre-sliced file avoids a new offset field and is self-describing for consumers. Generation is best-effort and never fails the checkpoint write; finalization (UpdateCommitted) regenerates the compact from the new content and keeps the previous one on generation failure so the metadata pointer never dangles. CLI read paths (rewind/resume/explain) are unaffected: they read full.jsonl by filename, not through the metadata pointer.

Entire-Checkpoint: 63b41777384a

Checkpoints

Store Compact Transcript in Checkpoints

Claude CodeFable 5
View session
Checkpoint 1

what else uses shadow branches under the hood besides entire rewind?

Claude CodeFable 5
View session
Checkpoint 1

Add Push Compact Transcripts Option

Claude CodeOpus 4.8
View session
Checkpoint 1

/goal compact transcripts (transcript.jsonl) are pushed up as part of checkpoints v1.

Claude CodeFable 5
View session
Checkpoint 1

Parse Tool Usage from Transcript Files

Claude CodeFable 5
View session
Checkpoint 1