Checkpoints v2: support attach command#955
Merged
computermode merged 7 commits intomainfrom Apr 15, 2026
Merged
Conversation
Entire-Checkpoint: e7edd70163ff
Entire-Checkpoint: 5d59e5e1153a
Contributor
There was a problem hiding this comment.
Pull request overview
Wires up attach to dual-write checkpoints into the v2 ref layout when checkpoints_v2 is enabled, including a v1→v2 backfill path when attaching to an existing v1 checkpoint.
Changes:
- Extend
runAttachto generate a compact transcript and best-effort dual-write to v2 whencheckpoints_v2is enabled. - Add attach-specific v2 backfill logic to mirror existing v1-only checkpoints into v2 refs.
- Add tests covering v2 dual-write and v1-only → v2 backfill behavior for
attach.
Reviewed changes
Copilot reviewed 2 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| cmd/entire/cli/attach.go | Adds v2 dual-write + backfill logic for attach-created checkpoints (best-effort, non-blocking). |
| cmd/entire/cli/attach_test.go | Adds coverage for v2 dual-write and backfilling an existing v1-only checkpoint into v2. |
| test | Empty file present in the PR contents (no functional change visible from provided diff). |
Entire-Checkpoint: 3ec3debb679a
Entire-Checkpoint: fa587109fd1d
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.
Wires up the
attachcommand to support checkpoints v2. Supports dual-write to v1 and v2 checkpoints when v2 is enabled.This change is not user facing and should not introduce any changes to the checkpoints v1 attach flow.
(Used the
994182ab5abatest checkpoint in d35e512 to ensure the new v2 checkpoint flow was executed correctly viaattach.)Note
Medium Risk
Adds conditional dual-write and backfill logic during
attach, which touches git ref storage and migration paths; failures are logged but could lead to v1/v2 divergence if bugs slip through.Overview
attachnow optionally mirrors committed checkpoints into checkpoints v2 whenstrategy_options.checkpoints_v2is enabled, while continuing to write to v1 as before.When attaching to an existing v1-only checkpoint, it backfills the full checkpoint into v2 (rewriting all sessions and copying task metadata when needed) to avoid creating a partial v2 shadow; v2 write failures are treated as best-effort and only logged.
Tests add coverage for v2 dual-write output (including compact + raw transcript files in v2 refs) and for backfilling an existing v1 checkpoint after enabling v2.
Reviewed by Cursor Bugbot for commit 73e4598. Configure here.