API Reference
Create Patch
Patch methods are static on the Sandbox class — they operate on checkpoints, not sandbox instances.| Parameter | Type | Required | Description |
|---|---|---|---|
checkpointId | string | Yes | Target checkpoint |
script | string | Yes | Bash script to execute on fork |
description | string | No | Human-readable description |
List Patches
Delete Patch
When Patches Run
Patches execute when a sandbox is forked from the checkpoint (viaSandbox.createFromCheckpoint() or oc checkpoint spawn). The strategy is always on_wake.
Execution Order
Patches run in creation order (bysequence number). If you create three patches, they execute as patch 1 → patch 2 → patch 3 every time a sandbox is forked.
PatchInfo
| Field | Type | Description |
|---|---|---|
id | string | Patch UUID |
checkpointId | string | Parent checkpoint |
script | string | Bash script content |
description | string | Human-readable description |
strategy | string | Always "on_wake" |
sequence | number | Execution order |
createdAt | string | Timestamp |