Inspect the sandbox
state field is the observed lifecycle state: requested, reserved, materializing,
ready, running, stopped, terminating, failed, terminated, quarantined, or
attention. A sandbox that reached failed or quarantined carries a state_reason explaining
why; states that need no explanation omit it. The record also reports the resolved image,
storage_class, resources, and endpoints.
Inspect a command’s outcome
There is no separate execution resource to fetch.hiloop sandbox exec returns the command’s real
exit code with stdout and stderr separated, so read them from the invocation itself:
stdout, stderr, exit, and truncated. A truncated of true means output
hit the server’s combined output cap, not that the command failed. A command that exceeded its
timeout returns partial output with no exit code.
Common causes
Correlate with telemetry
Every project-backed sandbox recordsruntime lifecycle events under its run
(the run_id returned by sandbox create). That platform timeline is independent of workload
capture and answers the questions above without tailing anything:
- Sandbox slow to start? Read
queue_wait_msonoperation.started— it separates time spent queued from time spent provisioning. - What failed, exactly?
operation.failedcarries a stableerror.codealongside the operation id you’re polling. - Who stopped my sandbox?
sandbox.state_changedrecords each committed transition (state.from→state.to);sandbox.preemptedmarks an eviction the platform observed but did not request.