Skip to content

Checkpoint graph: fork from any checkpoint and diff any two checkpoints #252

Closed

Description

@currentbits

Inspired by opcode's branching session timeline.

Today checkpoints are linear restore points (#149 covers rewinding the conversation). Upgrade to a timeline view: fork a new thread from any checkpoint (worktree state + conversation), and diff the worktree between any two checkpoints. Turns checkpoints into a navigable history instead of an undo stack.

Activity

  1. added
    enhancement
    plan:todo
    on Aug 17, 2026
  2. currentbits commented on Aug 17, 2026

    @currentbits
    OwnerAuthor

    Research note (jj): the stronger spine is an operation log, not snapshots. Record every VCS-mutating action per worktree as a reversible op (jj op log / undo), so any agent mistake, rebase or fetch can be undone, not just restored to a checkpoint. Also consider jj's inter_diff() primitive for the diff-between-checkpoints view.

  3. currentbits commented on Aug 17, 2026

    @currentbits
    OwnerAuthor

    Research note (accessibility round): natural-language undo delighted users ('I asked Copilot to undo an operation — and it worked'). Expose the checkpoint graph through the composer: 'undo that' resolves to the last checkpoint revert.

  4. currentbits commented on Aug 17, 2026

    @currentbits
    OwnerAuthor

    Research notes: (1) Ona (acquired by OpenAI) auto-checkpointed every 10 minutes during long runs — 'agent work must survive a closed laptop' is market-validated; add periodic automatic checkpoints during long threads, not just per-turn. (2) From the vibe-coder research: make 'go back to last green' the PRIMARY one-click action in every error state, with repair as secondary — non-coders cope by reverting, not repairing.

  5. currentbits commented on Aug 18, 2026

    @currentbits
    OwnerAuthor

    Deep-dive (Zed): a Restore Checkpoint button at the top of EACH user message restores the whole codebase to the pre-message state — and it appears even after mid-edit interruption. The per-message anchor is the right granularity.

  6. added
    plan:doing
    and removed
    plan:todo
    on Oct 13, 2026
  7. currentbits commented on Oct 13, 2026

    @currentbits
    OwnerAuthor

    Implemented on coder/checkpoint-graph-fork-from-any-checkpoin-c1a491 (not yet committed or merged):

    • Fork from any checkpoint: there's a Fork button on each row of the Checkpoints card. Under the hood it's threads.fork({ checkpointSha }) → forkFromCheckpoint. The new thread gets its own worktree starting at the checkpoint commit, recorded as leadSnapshotSha so it is never silently started from main. Its transcript is cut at the turn that produced the checkpoint: the commit's message-id trailer, falling back to the commit time. Only the source's own checkpoints are accepted.
    • Diff any two checkpoints: tick two rows to compare them. This calls git.turnDiff({ sha, from }) and renders in the existing TurnDiffPanel, always older → newer.
    • Fix: forks that get their own worktree now replay context instead of a native Claude --fork-session. Claude stores sessions per cwd, so resuming from a new worktree would fail the first turn.

    Not done: drawing forks as branches in a graph.

    Tests: electron 4717/4717, renderer 3040/3040, vite build OK.

  8. added
    plan:done
    and removed
    plan:doing
    on Oct 13, 2026
  9. currentbits commented on Oct 13, 2026

    @currentbits
    OwnerAuthor

    Landed from Solenta thread "Checkpoint graph: fork from any checkpoint and diff any two " (PR #1626). Closed on merge.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementplan:done

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions