Skip to content

Checkpoints V2: Support checkpoint_transcript_start for compact transcript.jsonl files#877

Merged
computermode merged 12 commits intomainfrom
transcript-start-at-metadata
Apr 10, 2026
Merged

Checkpoints V2: Support checkpoint_transcript_start for compact transcript.jsonl files#877
computermode merged 12 commits intomainfrom
transcript-start-at-metadata

Conversation

@computermode
Copy link
Copy Markdown
Contributor

@computermode computermode commented Apr 8, 2026

Ensures we have checkpoint_transcript_start in the metadata.json for the compact transcript.jsonl files and that we append to the transcript.jsonl for the corresponding session with each subsequent checkpoint (without deleting/cutting information from the file).

Also updates the migrate command to respect the start lines (previously, if I migrated, then added v1 checkpoints and migrated again, it wouldn't calculate checkpoint_transcript_start).

I tested this by creating multiple commits and checkpoints with a Claude session and inspecting the v2 refs to ensure that the checkpoint_transcript_start lines were added to the metadata.json file as expected. I also wired up the UI to read from v2 transcript.jsonl and ensured that only the new relevant logs to each checkpoint were displayed in the UI.

Testing with Codex next...


Note

Medium Risk
Changes how checkpoint_transcript_start is computed/persisted for v2 /main metadata and updates session state/migration logic to maintain a separate compact-transcript offset; mistakes could break transcript slicing or backfills across checkpoints.

Overview
V2 checkpoint metadata now records checkpoint_transcript_start in the compact transcript domain (transcript.jsonl) instead of the full transcript (full.jsonl). This adds CompactTranscriptStart to WriteCommittedOptions and updates V2GitStore to write that value into CommittedMetadata.CheckpointTranscriptStart on /main.

Manual-commit condensation now generates cumulative transcript.jsonl for v2 and tracks compact offsets across condensations. Session state gains compact_transcript_start, condensation computes/falls back to a compact start offset when missing, and state updates accumulate compact line counts so subsequent checkpoints get correct offsets.

migrate --checkpoints v2 now computes and writes the compact start offset during migration/backfill. It derives the offset by diffing full vs scoped compactions and includes new tests covering v2 write behavior, condensation behavior, and migration correctness.

Reviewed by Cursor Bugbot for commit 6607a7e. Configure here.

Copilot AI review requested due to automatic review settings April 8, 2026 19:44
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds support for correctly tracking checkpoint_transcript_start for v2 compact transcript.jsonl artifacts by introducing a compact-transcript-specific offset and propagating it through condensation and migration.

Changes:

  • Introduces CompactTranscriptStart/CompactTranscriptLines plumbing to track compact transcript offsets separately from full.jsonl offsets.
  • Updates v2 /main committed metadata writing to use the compact transcript start offset for checkpoint_transcript_start.
  • Enhances migrate to compute and persist compact transcript offsets when generating transcript.jsonl.

Reviewed changes

Copilot reviewed 10 out of 10 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
cmd/entire/cli/strategy/manual_commit_types.go Extends condensation result to report compact transcript line counts.
cmd/entire/cli/strategy/manual_commit_test.go Adds coverage ensuring v2 /main writes checkpoint_transcript_start correctly for compact transcripts.
cmd/entire/cli/strategy/manual_commit_hooks.go Updates session state to advance/reset compact transcript offsets across condensations/carry-forward.
cmd/entire/cli/strategy/manual_commit_condensation.go Plumbs compact transcript start into write options and computes compact transcript line deltas.
cmd/entire/cli/session/state.go Adds persisted compact_transcript_start to session state with legacy backfill behavior.
cmd/entire/cli/session/state_test.go Adds tests for CompactTranscriptStart normalization/backfill and JSON round-trip.
cmd/entire/cli/migrate.go Computes compact transcript offsets during migration and stores them in v2 write options.
cmd/entire/cli/checkpoint/v2_store_test.go Tests that v2 /main metadata uses CompactTranscriptStart for checkpoint_transcript_start.
cmd/entire/cli/checkpoint/v2_committed.go Switches v2 /main metadata field to use compact transcript start offset.
cmd/entire/cli/checkpoint/checkpoint.go Adds CompactTranscriptStart to WriteCommittedOptions for v2 metadata writing.

@computermode
Copy link
Copy Markdown
Contributor Author

bugbot review

Initialize compact transcript offsets from existing checkpoint offsets during state normalization and add tests to preserve migration behavior.

Made-with: Cursor
Entire-Checkpoint: 4678bd55995f
Entire-Checkpoint: 92926498c799
Entire-Checkpoint: 3e7abfc2d4a5
Entire-Checkpoint: 1b4ddd35692a
@computermode computermode force-pushed the transcript-start-at-metadata branch from c130e79 to 9f1fdec Compare April 9, 2026 18:29
Entire-Checkpoint: b82393d3cbc2
…t-start-at-metadata

 Conflicts:
	cmd/entire/cli/strategy/manual_commit_condensation.go
@computermode
Copy link
Copy Markdown
Contributor Author

bugbot run

Copy link
Copy Markdown

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Comment @cursor review or bugbot run to trigger another review on this PR

Reviewed by Cursor Bugbot for commit 6607a7e. Configure here.

Entire-Checkpoint: 25bfa690b2f8
Entire-Checkpoint: ef44f95b6973
@computermode computermode marked this pull request as ready for review April 10, 2026 20:54
@computermode computermode requested a review from a team as a code owner April 10, 2026 20:54
@computermode computermode merged commit 791a0a3 into main Apr 10, 2026
9 checks passed
@computermode computermode deleted the transcript-start-at-metadata branch April 10, 2026 23:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants