Skip to navigation

sandboxes Commands

View as Markdown

Manage sandboxes

Output formatting flags (--json, --jq, and --template) are documented once in Output Formatting and are omitted from the tables below.

bctrl sandboxes browser attach

Attach one browser from the same Space to a sandbox.

bctrl sandboxes browser attach <sandboxId> [flags]
FlagDescription
--headers <json>API headers: inline JSON, @file, or - for stdin
--api-version <date>Dated API contract (default: 2026-10-03)
--space <id-or-name>Select an authorized Space (BCTRL-Space)
--subaccount-id <id>Effective subaccount context (BCTRL-Subaccount-Id)
--idempotency-key <key>Retry key for this operation
--body <json>Request body: inline JSON, @file, or - for stdin

bctrl sandboxes connections create

Open an interactive terminal (PTY) to a ready sandbox. Returns a WebSocket URL and a one-time ticket. Refused while a Task is using the sandbox.

bctrl sandboxes connections create <sandboxId> [flags]
FlagDescription
--headers <json>API headers: inline JSON, @file, or - for stdin
--api-version <date>Dated API contract (default: 2026-10-03)
--space <id-or-name>Select an authorized Space (BCTRL-Space)
--subaccount-id <id>Effective subaccount context (BCTRL-Subaccount-Id)
--idempotency-key <key>Retry key for this operation
--body <json>Request body: inline JSON, @file, or - for stdin

bctrl sandboxes connections delete

Revoke a sandbox connection. An open terminal is closed within seconds.

bctrl sandboxes connections delete <sandboxId> <connectionId> [flags]
FlagDescription
--headers <json>API headers: inline JSON, @file, or - for stdin
--api-version <date>Dated API contract (default: 2026-10-03)
--space <id-or-name>Select an authorized Space (BCTRL-Space)
--subaccount-id <id>Effective subaccount context (BCTRL-Subaccount-Id)
--idempotency-key <key>Retry key for this operation
--yesConfirm this destructive operation

bctrl sandboxes connections get

Get a sandbox connection and whether it has been revoked.

bctrl sandboxes connections get <sandboxId> <connectionId> [flags]
FlagDescription
--headers <json>API headers: inline JSON, @file, or - for stdin
--api-version <date>Dated API contract (default: 2026-10-03)
--space <id-or-name>Select an authorized Space (BCTRL-Space)
--subaccount-id <id>Effective subaccount context (BCTRL-Subaccount-Id)

bctrl sandboxes create

Create a sandbox from an approved image. Returns while it is provisioning.

bctrl sandboxes create [flags]
FlagDescription
--headers <json>API headers: inline JSON, @file, or - for stdin
--api-version <date>Dated API contract (default: 2026-10-03)
--space <id-or-name>Select an authorized Space (BCTRL-Space)
--subaccount-id <id>Effective subaccount context (BCTRL-Subaccount-Id)
--idempotency-key <key>Retry key for this operation
--body <json>Request body: inline JSON, @file, or - for stdin

bctrl sandboxes delete

Permanently delete a sandbox that is not bound to a conversation.

bctrl sandboxes delete <sandboxId> [flags]
FlagDescription
--headers <json>API headers: inline JSON, @file, or - for stdin
--api-version <date>Dated API contract (default: 2026-10-03)
--space <id-or-name>Select an authorized Space (BCTRL-Space)
--subaccount-id <id>Effective subaccount context (BCTRL-Subaccount-Id)
--idempotency-key <key>Retry key for this operation
--yesConfirm this destructive operation

bctrl sandboxes files collect

Publish a file from the sandbox working directory as a durable File.

bctrl sandboxes files collect <sandboxId> [flags]
FlagDescription
--headers <json>API headers: inline JSON, @file, or - for stdin
--api-version <date>Dated API contract (default: 2026-10-03)
--space <id-or-name>Select an authorized Space (BCTRL-Space)
--subaccount-id <id>Effective subaccount context (BCTRL-Subaccount-Id)
--idempotency-key <key>Retry key for this operation
--body <json>Request body: inline JSON, @file, or - for stdin

bctrl sandboxes files list

List files in the sandbox working directory.

bctrl sandboxes files list <sandboxId> [flags]
FlagDescription
--query <json>Query object: inline JSON, @file, or - for stdin
--params <json>Alias for —query
--path <value>Query parameter path
--headers <json>API headers: inline JSON, @file, or - for stdin
--api-version <date>Dated API contract (default: 2026-10-03)
--space <id-or-name>Select an authorized Space (BCTRL-Space)
--subaccount-id <id>Effective subaccount context (BCTRL-Subaccount-Id)

bctrl sandboxes files stage

Copy a durable File into the sandbox working directory.

bctrl sandboxes files stage <sandboxId> [flags]
FlagDescription
--headers <json>API headers: inline JSON, @file, or - for stdin
--api-version <date>Dated API contract (default: 2026-10-03)
--space <id-or-name>Select an authorized Space (BCTRL-Space)
--subaccount-id <id>Effective subaccount context (BCTRL-Subaccount-Id)
--idempotency-key <key>Retry key for this operation
--body <json>Request body: inline JSON, @file, or - for stdin

bctrl sandboxes get

Get one sandbox with its status and qualified capabilities.

bctrl sandboxes get <sandboxId> [flags]
FlagDescription
--headers <json>API headers: inline JSON, @file, or - for stdin
--api-version <date>Dated API contract (default: 2026-10-03)
--space <id-or-name>Select an authorized Space (BCTRL-Space)
--subaccount-id <id>Effective subaccount context (BCTRL-Subaccount-Id)

bctrl sandboxes list

List sandboxes visible to the caller.

bctrl sandboxes list [flags]
FlagDescription
--query <json>Query object: inline JSON, @file, or - for stdin
--params <json>Alias for —query
--space-id <value>Query parameter spaceId
--cursor <value>Query parameter cursor
--order <value>Query parameter order
--limit <value>Query parameter limit
--headers <json>API headers: inline JSON, @file, or - for stdin
--api-version <date>Dated API contract (default: 2026-10-03)
--space <id-or-name>Select an authorized Space (BCTRL-Space)
--subaccount-id <id>Effective subaccount context (BCTRL-Subaccount-Id)

bctrl sandboxes ports create

An authenticated HTTPS URL that forwards to a TCP port inside the sandbox until it expires or is deleted.

bctrl sandboxes ports create <sandboxId> [flags]
FlagDescription
--headers <json>API headers: inline JSON, @file, or - for stdin
--api-version <date>Dated API contract (default: 2026-10-03)
--space <id-or-name>Select an authorized Space (BCTRL-Space)
--subaccount-id <id>Effective subaccount context (BCTRL-Subaccount-Id)
--idempotency-key <key>Retry key for this operation
--body <json>Request body: inline JSON, @file, or - for stdin

bctrl sandboxes ports delete

Revokes every open preview of the port; their URLs stop working at once.

bctrl sandboxes ports delete <sandboxId> <port> [flags]
FlagDescription
--headers <json>API headers: inline JSON, @file, or - for stdin
--api-version <date>Dated API contract (default: 2026-10-03)
--space <id-or-name>Select an authorized Space (BCTRL-Space)
--subaccount-id <id>Effective subaccount context (BCTRL-Subaccount-Id)
--idempotency-key <key>Retry key for this operation
--yesConfirm this destructive operation

bctrl sandboxes ports list

The ports of the sandbox that have an open, unexpired preview, with the preview connections of each.

bctrl sandboxes ports list <sandboxId> [flags]
FlagDescription
--headers <json>API headers: inline JSON, @file, or - for stdin
--api-version <date>Dated API contract (default: 2026-10-03)
--space <id-or-name>Select an authorized Space (BCTRL-Space)
--subaccount-id <id>Effective subaccount context (BCTRL-Subaccount-Id)

bctrl sandboxes processes cancel

Cancel one sandbox process.

bctrl sandboxes processes cancel <sandboxId> <processId> [flags]
FlagDescription
--headers <json>API headers: inline JSON, @file, or - for stdin
--api-version <date>Dated API contract (default: 2026-10-03)
--space <id-or-name>Select an authorized Space (BCTRL-Space)
--subaccount-id <id>Effective subaccount context (BCTRL-Subaccount-Id)
--idempotency-key <key>Retry key for this operation

bctrl sandboxes processes create

Start a bounded process in a sandbox. The command is an argument array, never a shell string. For an interactive PTY, open a terminal connection.

bctrl sandboxes processes create <sandboxId> [flags]
FlagDescription
--headers <json>API headers: inline JSON, @file, or - for stdin
--api-version <date>Dated API contract (default: 2026-10-03)
--space <id-or-name>Select an authorized Space (BCTRL-Space)
--subaccount-id <id>Effective subaccount context (BCTRL-Subaccount-Id)
--idempotency-key <key>Retry key for this operation
--body <json>Request body: inline JSON, @file, or - for stdin

bctrl sandboxes processes get

Get a sandbox process with its exit code and captured output.

bctrl sandboxes processes get <sandboxId> <processId> [flags]
FlagDescription
--headers <json>API headers: inline JSON, @file, or - for stdin
--api-version <date>Dated API contract (default: 2026-10-03)
--space <id-or-name>Select an authorized Space (BCTRL-Space)
--subaccount-id <id>Effective subaccount context (BCTRL-Subaccount-Id)

bctrl sandboxes processes stream

Stream sandbox process output and completion.

bctrl sandboxes processes stream <sandboxId> <processId> [flags]
FlagDescription
--query <json>Query object: inline JSON, @file, or - for stdin
--params <json>Alias for —query
--after <value>Query parameter after
--headers <json>API headers: inline JSON, @file, or - for stdin
--api-version <date>Dated API contract (default: 2026-10-03)
--space <id-or-name>Select an authorized Space (BCTRL-Space)
--subaccount-id <id>Effective subaccount context (BCTRL-Subaccount-Id)
--last-event-id <id>Resume the event stream after this event
--timeout-ms <milliseconds>End the stream after this duration (1–60000)
--max-events <number>End after this many SSE events (1–200)

bctrl sandboxes snapshot-schedule delete

Stop snapshotting a sandbox on a schedule. Scheduled snapshots already taken are kept until deleted.

bctrl sandboxes snapshot-schedule delete <sandboxId> [flags]
FlagDescription
--headers <json>API headers: inline JSON, @file, or - for stdin
--api-version <date>Dated API contract (default: 2026-10-03)
--space <id-or-name>Select an authorized Space (BCTRL-Space)
--subaccount-id <id>Effective subaccount context (BCTRL-Subaccount-Id)
--idempotency-key <key>Retry key for this operation
--yesConfirm this destructive operation

bctrl sandboxes snapshot-schedule set

Snapshot a sandbox on a schedule (it applies at once to a running sandbox and on every start). Scheduled snapshots are listed with its snapshots (scheduled: true) and deleted by the retention.

bctrl sandboxes snapshot-schedule set <sandboxId> [flags]
FlagDescription
--headers <json>API headers: inline JSON, @file, or - for stdin
--api-version <date>Dated API contract (default: 2026-10-03)
--space <id-or-name>Select an authorized Space (BCTRL-Space)
--subaccount-id <id>Effective subaccount context (BCTRL-Subaccount-Id)
--idempotency-key <key>Retry key for this operation
--body <json>Request body: inline JSON, @file, or - for stdin

bctrl sandboxes snapshots create

Snapshot a running sandbox with its memory and disk; it keeps running. The snapshot stays on the node that runs the sandbox, and POST /sandboxes with fromSnapshot forks it there.

bctrl sandboxes snapshots create <sandboxId> [flags]
FlagDescription
--headers <json>API headers: inline JSON, @file, or - for stdin
--api-version <date>Dated API contract (default: 2026-10-03)
--space <id-or-name>Select an authorized Space (BCTRL-Space)
--subaccount-id <id>Effective subaccount context (BCTRL-Subaccount-Id)
--idempotency-key <key>Retry key for this operation
--body <json>Request body: inline JSON, @file, or - for stdin

bctrl sandboxes snapshots delete

Delete a sandbox snapshot from its node. Sandboxes already forked from it keep running.

bctrl sandboxes snapshots delete <sandboxId> <snapshotId> [flags]
FlagDescription
--headers <json>API headers: inline JSON, @file, or - for stdin
--api-version <date>Dated API contract (default: 2026-10-03)
--space <id-or-name>Select an authorized Space (BCTRL-Space)
--subaccount-id <id>Effective subaccount context (BCTRL-Subaccount-Id)
--idempotency-key <key>Retry key for this operation
--yesConfirm this destructive operation

bctrl sandboxes snapshots get

Get a sandbox snapshot.

bctrl sandboxes snapshots get <sandboxId> <snapshotId> [flags]
FlagDescription
--headers <json>API headers: inline JSON, @file, or - for stdin
--api-version <date>Dated API contract (default: 2026-10-03)
--space <id-or-name>Select an authorized Space (BCTRL-Space)
--subaccount-id <id>Effective subaccount context (BCTRL-Subaccount-Id)

bctrl sandboxes snapshots list

List the snapshots taken of a sandbox, newest first.

bctrl sandboxes snapshots list <sandboxId> [flags]
FlagDescription
--headers <json>API headers: inline JSON, @file, or - for stdin
--api-version <date>Dated API contract (default: 2026-10-03)
--space <id-or-name>Select an authorized Space (BCTRL-Space)
--subaccount-id <id>Effective subaccount context (BCTRL-Subaccount-Id)

bctrl sandboxes sshSessions create

Short-lived SSH credentials (host, port, one-time password) for a shell or commands in the sandbox. Revoke with DELETE /v1/sandboxes/{sandboxId}/connections/{id}.

bctrl sandboxes sshSessions create <sandboxId> [flags]
FlagDescription
--headers <json>API headers: inline JSON, @file, or - for stdin
--api-version <date>Dated API contract (default: 2026-10-03)
--space <id-or-name>Select an authorized Space (BCTRL-Space)
--subaccount-id <id>Effective subaccount context (BCTRL-Subaccount-Id)
--idempotency-key <key>Retry key for this operation
--body <json>Request body: inline JSON, @file, or - for stdin

bctrl sandboxes start

Ensure a sandbox has running compute, keeping its disk.

bctrl sandboxes start <sandboxId> [flags]
FlagDescription
--headers <json>API headers: inline JSON, @file, or - for stdin
--api-version <date>Dated API contract (default: 2026-10-03)
--space <id-or-name>Select an authorized Space (BCTRL-Space)
--subaccount-id <id>Effective subaccount context (BCTRL-Subaccount-Id)
--idempotency-key <key>Retry key for this operation

bctrl sandboxes stop

Stop sandbox compute. Active processes are a conflict unless force is set. The disk stays on the host while stopped and is not replicated: if that host is lost, the sandbox fails with environment.host_lost and its files may be lost.

bctrl sandboxes stop <sandboxId> [flags]
FlagDescription
--headers <json>API headers: inline JSON, @file, or - for stdin
--api-version <date>Dated API contract (default: 2026-10-03)
--space <id-or-name>Select an authorized Space (BCTRL-Space)
--subaccount-id <id>Effective subaccount context (BCTRL-Subaccount-Id)
--idempotency-key <key>Retry key for this operation
--body <json>Request body: inline JSON, @file, or - for stdin
--yesConfirm this destructive operation