Cancel a setup run
Stops a queued or in-flight manual or automatic runner_refresh setup run and releases its compute. Sessions waiting on a cancelled runner_refresh fail with that run as their cause. The cancelled run is returned with status cancelled and active_setup_run_id is cleared. A cancelled run proves nothing: a standing verified or failed verdict is kept as it was, and an environment whose only verdict was running reverts to never. 409 when the run had already finished.
Authorizations
A Recursion API key, created in the console under API keys.
Headers
Optional tenant consistency check. When present, it must name the tenant bound to the API key, including when x-organization-id is default.
1Organization in which to act. Required for a tenant-scoped API key. Optional for an organization-scoped key, where it must name that same organization. The value may be an organization id or default.
1Path Parameters
Environment id (UUID).
Setup run id as returned by managedAgentsCreateEnvironmentSetupRun or the environment's setup_verification.active_setup_run_id.
Response
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), runner_refresh (automatically captures an image for the current runner), or session (legacy in-session setup).
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; managedAgentsGetEnvironmentSetupRun 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.
-9007199254740991 <= x <= 9007199254740991Exit code of the setup script when it ran. 124 means the timeout elapsed.
-9007199254740991 <= x <= 9007199254740991The failing line's command as written, unexpanded.
1-based line in the setup script whose command exited non-zero. 0 when unknown.
-9007199254740991 <= x <= 9007199254740991Machine-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.
-9007199254740991 <= x <= 9007199254740991Lines of log persisted for the run. The last line's seq equals this; pass it as after to tail.
-9007199254740991 <= x <= 9007199254740991True 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.
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.