/v2/agents/sessions/{session_id}/forkForkSession creates child sessions from a checkpoint of this session.
Each child boots a fresh sandbox from the checkpoint's machine-state capture and is drivable exactly like any other session (input, HITL), with parent_session_id and fork_id set for lineage. When from_checkpoint_id is omitted, an implicit checkpoint of the session "now" is captured first and the children fork from that. All-or-nothing: on failure nothing is left running.
- IdempotentThe SDK sends
Idempotency-Key, so a retried request is only applied once.
Optional; an empty or omitted body forks a single child from an implicit checkpoint of "now".
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: Team is at the active-session quota, the checkpoint is not READY, or the source session is itself a fork. 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: Forking is not supported for this agent/substrate. Any other status is an error: There was an unexpected error.