run --wait, run wait or ci run when the job needs the test verdict. A successful result list or result get exits 0 for any verdict.
Exit codes
Wait timeout (exit 7)
For an ordinary run, the command can return partial JSON with the run IDs, results observed so far andpartial: true. Resume the existing execution:
run wait also exits 7 when the backend cannot supply whole-execution status. An agent conversation that reached its follow timeout can be resumed with testsprite status --wait.
Unconfirmed run settings
For a project run orci run, the CLI exits 7 if the receipt fails to confirm the requested URL or environment, or reports concurrency above the requested limit. In JSON errors, error.code is UNSUPPORTED and error.details.field identifies the setting (targetUrl, previewName, environment or maxConcurrency). Inspect the run identified by error.details.runId before retrying. An unconfirmed tunnel also returns UNSUPPORTED. Its error message identifies the tunnel issue.
Interrupts and pipes
An ordinary wait detaches on Ctrl-C. The execution continues and can still incur charges. Stop it explicitly withtestsprite run cancel "$RUN_ID".
A local run that owns its tunnel requests cancellation of unfinished owned executions by default and closes the tunnel on timeout or interrupt. Read the cancellation outcome before starting another run. With --no-cancel-on-interrupt, the tunnel still closes and remaining steps that need it can fail. A run borrowing a live tunnel can be followed while the owner keeps it open. Cancelling Runs
An interrupt can produce both partial JSON on stdout and an INTERRUPTED error with details.signal on stderr. Keep them separate. A closed output pipe is handled without an unhandled EPIPE error.
Error codes
Error output
In JSON mode a command can write diagnostics (such as a request key) as well as an error envelope to stderr. The envelope’serror object includes a machine-readable code and message; when supplied, nextAction, requestId and details explain how to proceed or trace the request. A completed failed run can still write all of its results to stdout.
Statuses
test listandtest getdescribe test cases. To look up a case’s latest result, useresult list --test <test-id> --limit 1.result list --run <run-id>reports execution progress inrun.status(runningorfinished) and cancellation inrun.cancelled. A finished execution can contain failures.- Result records use
testStatusvalues such asPASSED,FAILED,BLOCKED,RUNNINGorCANCELLED. Includecancelledexplicitly in a list’s--statusfilter to see cancellations. The corresponding verdicts inrun waituse lowercasestatus. Steps inresult getusepassed,failedornull.
Retrying safely
Pass a consistent--idempotency-key when retrying the same launch. With an unconfirmed project launch, reuse the reported retryIdempotencyKey on the entire original command. Changing the request while keeping its key can produce IDEMPOTENCY_BODY_MISMATCH. If you already have a run ID, run wait follows that execution without starting or charging for another. Output & Scripting