Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion sandbox/sdk/python/reference.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ Arguments:
| `tags` | `dict[str, str] \| None` | Key-value labels for finding related sandboxes. |
| `volume_mounts` | `dict[str, str] \| None` | Volume IDs keyed by absolute mount path inside the sandbox. |

Returns a `Sandbox` handle.
Returns a `Sandbox` handle. `create` returns once the request is recorded, which is before the container is necessarily running — the sandbox may still be in `queued` (waiting for capacity) or `creating`. Call `sandbox.refresh()` until `sandbox.phase == "running"` before calling `exec`.

### `get`

Expand Down
2 changes: 1 addition & 1 deletion sandbox/sdk/typescript/reference.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ Options:
| `tags` | `Record<string, string> \| undefined` | Key-value labels for finding related sandboxes. |
| `volume_mounts` | `Record<string, string> \| undefined` | Volume IDs keyed by absolute mount path inside the sandbox. |

Returns a `Sandbox` handle.
Returns a `Sandbox` handle. `create` resolves once the request is recorded, which is before the container is necessarily running — the sandbox may still be in `queued` (waiting for capacity) or `creating`. Call `sandbox.refresh()` until `sandbox.phase === "running"` before calling `exec`.

### `get`

Expand Down
6 changes: 6 additions & 0 deletions sandboxes/overview.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,12 @@ A sandbox moves through these phases:

Only `running` sandboxes accept exec calls. Logs remain available after terminal phases so you can fetch output from completed or terminated sandboxes.

## Queueing and capacity

Sandbox create returns as soon as the request is durably recorded. If the cluster does not have capacity to launch the sandbox immediately, the sandbox stays in `queued` until capacity becomes available — create no longer fails on a transient capacity miss. Queued sandboxes are launched in creation order as slots free up, and the warm pool sizes itself against the current queue depth so backlogs drain without manual intervention.

Because create is non-blocking, the returned sandbox may still be in the `queued` or `creating` phase. Poll `refresh()` (SDK) or `porter sandbox status` (CLI) until the phase reaches `running` before calling `exec`. Calling `exec` on a sandbox that is not yet `running` returns a "sandbox is not running" error rather than blocking.

## Names

Names are the canonical way to refer to sandboxes and volumes in the SDK and CLI.
Expand Down