/v2/agents/sessions/{session_id}/checkpointsCreateCheckpoint captures the session's live sandbox state as a durable checkpoint.
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.
- IdempotentThe SDK sends
Idempotency-Key, so a retried request is only applied once.
Optional; an empty or omitted body creates an unlabeled checkpoint.
A 401 is returned: Authentication failed due to invalid credentials. A 402 is returned: The team is blocked by the prepayment gate. A 403 is returned: Session belongs to another team. A 404 is returned: The resource was not found. A 409 is returned: Session busy (an active turn is in flight), session not running, or team checkpoint storage quota exceeded. A 423 is returned: This session is unavailable; contact support. A 429 is returned: The API rate limit has been exceeded. A 500 is returned: There was a server error. A 501 is returned: Checkpoints are not supported for this agent/substrate. Any other status is an error: There was an unexpected error.