Agent-readable docs index: /llms.txt. Full docs in one file: /llms-full.txt. Download /docs.zip to grep all markdown files locally.

Errors

Every failed API call answers with one JSON shape, and the CLI and MCP server pass it on unchanged:
{"error": {"code": "not_found", "message": "no such sandbox", "remedy": "fix_input"}}
Branch on code, never on message. remedy says what to do:
remedyMeaning
fix_inputThe same request fails the same way. Change it.
retryTransient. Retry with backoff.
raise_limitsIt needs more room or more time (a bigger timeout, memory or disk).
contact_supportNothing the caller can do. Report it with the sandbox id.

Codes

codeHTTPremedyMeaning
invalid_argument400fix_inputMalformed request. Unknown JSON fields are refused too.
unauthenticated401fix_inputNo key, or the key is invalid, revoked or expired.
forbidden403fix_inputA valid key without the scope the route needs.
account_suspended403contact_supportThe account is suspended.
permission_denied403fix_inputThe sandbox user may not do this (a file, a path).
not_found404fix_inputNo such sandbox, process, path, build, template or key. Another account's sandbox is also not_found.
sandbox_not_ready409retryThe sandbox is still allocating. Retry once it is running.
template_not_ready409retryThe template has no version under that tag yet; a build of it is still running.
cancelled409fix_inputThe work was cancelled (a build, for instance).
lease_expired410fix_inputThe sandbox's lease ran out and it was reclaimed. See leases.
out_of_memory422raise_limitsThe OOM killer took the command or the sandbox. Give it more memory_mib.
out_of_disk422raise_limitsThe filesystem is full. Free space or ask for more disk_mib.
capacity_exhausted503, or 429retryNo room for another sandbox. 429 means the account is at its slot limit; 503 means the host is full.
unavailable503retrySomething runner runs did not answer. The CLI and MCP also use it when they cannot reach the API.
timeout504raise_limitsA command ran past its timeout_ms.
unsupported501fix_inputThe runtime or this deployment does not implement it (for example previews not enabled). Do not retry.
internal500contact_supportA bug in runner. Retry once, then report it.
The CLI adds nothing new: a usage mistake is invalid_argument, an interrupted run is cancelled, and a wait that ran out is timeout.

Where codes appear besides the HTTP status

  • A sandbox that ended for a reason has it in error_code (out_of_memory, lease_expired, ...), and in its terminated event.
  • A streamed exec or build log ends with an error event holding the same object under "error".
  • A non-streamed exec that timed out or was OOM-killed answers 504 / 422 with both "error" and the command's partial "result".