workspaces

Update Checkpoint Sync Status

Update checkpoint sync status on the worktree.

Called by the daemon after successfully uploading a checkpoint.

Updates:

  1. Sets last_synced_checkpoint_id on the worktree that owns this checkpoint
  2. Always updates workspace sync_state.synced_checkpoints

Worktree lookup strategy:

  1. First try matching current_checkpoint_id (fast path for quick syncs)
  2. If not found (race condition: user created new checkpoint during sync), fall back to the single worktree if only one exists

The last_synced_checkpoint_id field tracks the last successfully synced checkpoint. This may differ from current_checkpoint_id if:

  • The user created new checkpoints while sync was in progress
  • A sync upload failed for a more recent checkpoint

This allows us to always have a known-good checkpoint to fall back to.

patch/api/v1/workspaces/{workspace_id}/sync/checkpoint-status

Path parameters

workspace_idstring required

Request body

checkpoint_idstring required
syncedboolean required

Response

Successful Response

object required

Changes

No recorded changes to this endpoint across all 1 revision of this API.