Get a setup run, optionally waiting for it to finish
Returns one setup run. With wait_seconds the call blocks until the run reaches a terminal status or the wait elapses, so a poll loop needs no client-side timer. next_action names the call to make on the result: poll again, read the log, or start a session.
Authorizations
A Recursion API key, created in the console under API keys.
Path Parameters
Environment id (UUID).
Setup run id as returned by createEnvironmentSetupRun or the environment's setup_verification.active_setup_run_id.
Query Parameters
Block up to this many seconds for the run to reach succeeded, failed, or cancelled before responding. The server caps the wait at 5 seconds; larger values are accepted and clamped. 0 (the default) returns immediately and is recommended through the public API: sleep two seconds client-side and repeat to avoid timeouts on long-held requests.
0 <= x <= 60Response
One execution of an environment's setup script on fresh compute: provision, GPU check, script, profile, image capture, cleanup. Read status until terminal, then hint, failed_line, and stderr_tail; the full log is a separate call.
One execution of an environment's setup script on fresh compute: provision, GPU check, script, profile, image capture, cleanup. Read status until terminal, then hint, failed_line, and stderr_tail; the full log is a separate call.
When the run was requested.
Environment whose setup ran.
manual (requested through the API to verify the environment) or session (performed while provisioning a session).
Organization that owns the environment.
Server-assigned id of the run.
queued, provisioning, running, succeeded, failed, or cancelled. Poll until one of the last three; getEnvironmentSetupRun accepts wait_seconds to do that server-side.
Provider id of the compute the run used. Released when the run ends.
What the compute turned out to be: vCPUs, memory, GPUs, Docker state, image tools. Recorded after setup passed.
Wall-clock duration in milliseconds, provisioning included.
Exit code of the setup script when it ran. 124 means the timeout elapsed.
The failing line's command as written, unexpanded.
1-based line in the setup script whose command exited non-zero. 0 when unknown.
Machine-readable failure class when the run did not succeed: environment_setup_failed, sandbox_capacity_unavailable, sandbox_gpu_not_ready, sandbox_provision_timeout, and so on. Same vocabulary as session failures.
Hash of the environment configuration the run executed.
When the run reached a terminal status.
GPU readiness report for accelerator environments.
Likely fix when the failure cause is recognised.
Stable identifier of the recognised failure cause.
Runner image the compute booted.
Capture failure recorded without changing the setup script verdict.
Agent Service image id being captured.
Bytes of log persisted for the run.
Lines of log persisted for the run. The last line's seq equals this; pass it as after to tail.
True when the script produced more output than the run keeps (4 MiB); the head and the stderr tail are retained.
One-sentence description of the outcome.
The call that acts on this result: re-run setup after fixing the script, or fetch the log.
Current or final phase: provision, gpu_check, setup, profile, commit, cleanup.
Last Agent Service setup event sequence persisted into this run's log.
Durable Agent Service run id executing the setup script.
User who requested a manual run.
Session the run provisioned, for kind session.
Immutable image published by this run when capture succeeded.
When provisioning began.
Last lines of stderr, redacted and bounded to 2 KiB.