Create a sandbox
- Omit
--nameto auto-generate a slug. - Pass
--team-idto charge a different workspace. - Add
--yesto skip the confirmation prompt in automation. - In the SDK, pass
idempotency_keyto make create retries safe: requests that share a key are deduplicated, so a network failure mid-create can be re-run without producing a second sandbox.
Start command
Run your own process when the sandbox boots. There is no shell, so the executable and each argument are separate values:&&), invoke a shell explicitly: -- /bin/sh -c "python serve.py --port 8000" on the CLI, or StartCommand(executable="/bin/sh", args=["-c", "python serve.py --port 8000"]) in Python.
The start command is one-shot: when the process exits, the sandbox stops. Omit it to keep the sandbox up and ready for commands.
Timeouts
The timeout caps total lifetime (default 60 minutes). Set it to any negative value to remove the lifetime deadline. The idle timeout terminates the sandbox sooner when nothing is using it, which is useful for agent workflows that might forget to clean up:- Disabled by default.
- Must be between 1 and 1,440 minutes. For a finite lifetime, it must not exceed the timeout.
- SSH sessions do not count as activity.
termination_reason="idle_timeout" in the SDK, and Idle Timeout in prime sandbox get and on the dashboard.
Labels
Tag sandboxes by project, team, or environment, then filter or bulk-delete by label:Inspect
Delete
--label, or --all. --all and --label deletes run as a single server-side scoped delete: by default they cover your own sandboxes, --all-users covers the whole team, and --user <user-id> covers one teammate (both admin-only). The CLI prints a count preview before deleting, and per-sandbox results for explicit IDs.
Troubleshooting
- Sandbox stuck in
PENDINGthe first time you use an image? Prime is converting it into a VM image, which can take a few minutes. See VM images. - Stuck in
PROVISIONING? Wait a minute, then rerunprime sandbox list --status RUNNING. If it stays pending, delete and recreate from a known-good image. - Auth errors on transfers?
prime sandbox reset-cache(CLI) orclient.clear_auth_cache()(SDK) refreshes the gateway token after you rotate API keys.