Branch a sandbox
branch_sandboxCreate an isolated child sandbox from a parent, copying workspace and environment via copy-on-write and starting with a fresh home directory for safe, repeatable agent work.
Instructions
Create an isolated child sandbox branched from a parent sandbox (cloud or local). Clones /workspace and /opt/env via fast copy-on-write, starts with a fresh /home/node by default, and optionally inherits allowlisted agent auth, attenuated Git access (cloud), or the parent env profile (cloud).
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": {
"parent": "<parent>"
},
"name": "branch_sandbox"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | No | Optional name for the child sandbox. | |
| size | No | Cloud sandbox size (defaults to parent size). | |
| parent | Yes | A cloud sandbox's id (rtp-...), or a local sandbox's name, from list_sandboxes. | |
| env_profile | No | Cloud only: explicit org env profile (name or envp-... ID) to attach to the child. | |
| inherit_env | No | Clone parent /opt/env into the child when present. Defaults to true. | |
| inherit_git | No | Cloud only: Git repository access inherited from parent (attenuated; never escalates above parent). Defaults to "none". | |
| inherit_auth | No | Copy allowlisted Claude/Codex login files only (cloud: parent owner only). Defaults to false. | |
| parent_turn_id | No | Optional parent trace/turn ID to link in lineage metadata. | |
| inherit_workspace | No | Clone parent /workspace into the child. Defaults to true. | |
| inherit_env_profile | No | Cloud only: inherit the parent sandbox env profile (re-checked against caller RBAC). Defaults to false. |