pydo.harness.create_session_checkpoint()

Generated on 6 Nov 2026 from pydo version v0.45.0

Usage

client.harness.create_session_checkpoint(
    session_id="a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    body={
        "label": "your_label",
    },
)
Returns JSON Raises HttpResponseError

Description

Synchronous: blocks until the capture reaches READY and returns the terminal Checkpoint — clients never see PENDING on this endpoint and need no poll loop. The checkpoint binds the machine-state capture to the event-log cursor at the cut, so it can later seed forks (POST …/fork) and rollback. Checkpoints are taken between turns; a session with an active turn in flight returns 409. A checkpoint captures machine state only: the files of a persistent workspace the session has are not in it, and are saved by the workspace itself.

Parameters

session_id string required

Example: a1b2c3d4-e5f6-7890-abcd-ef1234567890

The session UUID.

label string optional

Optional human-readable label stored on the checkpoint; "" if omitted.

Request Sample

Show Request Sample
import os
from pydo import Client

client = Client(token=os.environ.get("DIGITALOCEAN_TOKEN"))

req = {
  "label": "string"
}

resp = client.harness.create_session_checkpoint(session_id="a1b2c3d4-e5f6-7890-abcd-ef1234567890", body=req)

Response Example

Show Response Example
{
  "checkpoint": {
    "checkpoint_id": "cp_9f2c1a4b",
    "session_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    "status": "READY",
    "kind": "explicit",
    "label": "before-refactor",
    "event_id": "01JABCDEFGHJKLMNPQRSTVWXYZ",
    "size_bytes": 1048576,
    "created_at": "2026-08-01T12:00:00Z",
    "error_message": "capture timed out"
  }
}

More Information

See /v2/agents/sessions/{session_id}/checkpoints in the API reference for additional detail on responses, headers, parameters, and more.

We can't find any results for your search.

Try using different keywords or simplifying your search terms.