Checkpoints V2: Support checkpoint_transcript_start for compact transcript.jsonl files#877
Merged
computermode merged 12 commits intomainfrom Apr 10, 2026
Merged
Conversation
Contributor
There was a problem hiding this comment.
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/CompactTranscriptLinesplumbing to track compact transcript offsets separately fromfull.jsonloffsets. - Updates v2
/maincommitted metadata writing to use the compact transcript start offset forcheckpoint_transcript_start. - Enhances
migrateto compute and persist compact transcript offsets when generatingtranscript.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. |
Contributor
Author
|
bugbot review |
Entire-Checkpoint: e5883f33cb01
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: 15712c7a9051
Entire-Checkpoint: 92926498c799
Entire-Checkpoint: 3e7abfc2d4a5
Entire-Checkpoint: 1b4ddd35692a
c130e79 to
9f1fdec
Compare
Entire-Checkpoint: b82393d3cbc2
…t-start-at-metadata Conflicts: cmd/entire/cli/strategy/manual_commit_condensation.go
Entire-Checkpoint: d19b19c878be
Contributor
Author
|
bugbot run |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ 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
pfleidi
reviewed
Apr 10, 2026
pfleidi
approved these changes
Apr 10, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Ensures we have
checkpoint_transcript_startin the metadata.json for the compacttranscript.jsonlfiles and that we append to thetranscript.jsonlfor the corresponding session with each subsequent checkpoint (without deleting/cutting information from the file).Also updates the
migratecommand to respect the start lines (previously, if I migrated, then added v1 checkpoints and migrated again, it wouldn't calculatecheckpoint_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_startlines were added to themetadata.jsonfile 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_startis computed/persisted for v2/mainmetadata 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_startin the compact transcript domain (transcript.jsonl) instead of the full transcript (full.jsonl). This addsCompactTranscriptStarttoWriteCommittedOptionsand updatesV2GitStoreto write that value intoCommittedMetadata.CheckpointTranscriptStarton/main.Manual-commit condensation now generates cumulative
transcript.jsonlfor v2 and tracks compact offsets across condensations. Session state gainscompact_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 v2now 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.