Fork sandbox
fork_sandboxDuplicate an existing sandbox into a new independent fork while leaving the source unmodified. Override size, environment, network policy, or TTL, and retry safely with an idempotency key.
Instructions
Fork sandbox. Provision a new sandbox from an existing one. Send an Idempotency-Key header to make this call safe to retry after a lost response without creating a second billable fork.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"sandboxId": "<sandboxId>"
},
"name": "fork_sandbox"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| env | No | Replaces the env the fork would otherwise inherit from the source sandbox. Same validation rules as `CreateSandboxRequest.env`. | |
| type | No | Machine size for the fork. Omit to inherit the source sandbox's type. `xlarge` needs the $100/month plan or higher (403 `machine_class_plan_required`). The source sandbox is never modified. Shrinking is rejected with `type_too_small` when the source's data would not fit the smaller disk. | |
| noEnv | No | Make the fork no-env (see `CreateSandboxRequest.noEnv`). A fork of a no-env sandbox is always no-env regardless of this field. | |
| labels | No | Labels of the fork. The fork never takes the source's labels. Same rules as `CreateSandboxRequest.labels`. | |
| network | No | What the sandbox may connect to. Send `mode`, `inbound` or both: at least one. The side that the request does not name stays as it is. `inbound` and `inboundAllow` are one side. A sandbox that sets one side has its own policy and no longer follows its environment; `mode: environment` makes it follow again. On create, omitted means the policy of its environment; with `from`, the policy that the saved snapshot's sandbox had. On fork, omitted means what the source sandbox has. An API key without the `network.write` action always gets the policy that the sandbox would have without this field, a tighter one included: any other value is refused with 403 `api_key_action_forbidden`. A bad policy is refused with 400 `invalid_network_policy`. When no host can enforce a policy now, create and fork answer 409 `network_policy_unsupported`. A CI runner is always `open` and follows no environment. | |
| failFast | No | Pass `true` to fork only if a machine is ready right now. Within about 1.5 s you get the usual `202`, or `503` `no_ready_machine` with no fork created and nothing counted against your start limits. | |
| sandboxId | Yes | Public Sandbox id returned by create/list/get sandbox calls. | |
| monitoring | No | `false` creates the fork with monitoring off: Boat keeps no command or process output, process list or CPU/RAM samples for it. Omitted, the fork keeps the source sandbox's setting. `true` turns it on for the fork, unless the account has monitoring off by default (`409` `monitoring_off_for_account`). | |
| ttlSeconds | No | Auto-stop for the fork, in seconds. Omit for the 1 hour default; the fork does NOT inherit the source sandbox's TTL, so forking a sandbox that has auto-stop disabled still gives you a fork that stops itself. `null` disables auto-stop, which means nothing will ever stop this sandbox for you. | |
| environment | No | Optionally pin the fork to a different named sandbox environment. Omit to inherit the source sandbox's environment. Unknown names are rejected with `unknown_environment`. |