Skip to main content
Version: v5.6.1

opschain runs approve

Included from Basic tier

opschain runs approve <run-id> --step <step-id> [--message <text>] [--input <name=value>]...

Approves one waiting approval step of a server run. The run id picks the step family — a change's steps or a workflow run's workflow steps, with the same fall-through as runs show — and --step names the step; the answer posts the step's approve verb on API v2 (StepService.ApproveStep, or WorkflowStepService.ApproveWorkflowStep for a workflow run's step).

Find the waiting step's id in runs show <run-id> -o json: it is the step whose status_code is waiting. A step that is not waiting for this answer is refused by the server with its named error. Every answer is audited.

This is a server verb. A local attached run's gates are answered on the terminal prompt instead (or pre-answered by the create command's auto-approve flag).

Flags​

FlagMeaning
--step <step-id>The waiting step's id (required).
--message <text>Audit note recorded with the approval.
--input <name=value>Wait-step input argument (repeatable; values parse as JSON when valid). Merged over the step's declared defaults and recorded on the step — e.g. the release_train gate's accepted_evidence, naming the accepted report/commit the approval attests.

Output​

approved step 0199c8aa-… of run 0199c81e-… — now running

-o json|yaml prints the answered step document; the step's new status is its status_code.

Exit codes​

CodeMeaning
0Answered.
1The answer failed — unknown run, or the server refused it (step not waiting for an approval).
2Usage error (missing --step, local target).

Named errors​

  • runs approve answers a server run's gates — pass --server <url> or 'opschain context use <name>' (local runs prompt on the terminal instead) — no server target (exit 2).
  • required flag(s) "step" not set — exit 2.
  • run "<id>" not found on the server — neither family knows the id (exit 1).

See also​

  • opschain docs cli/runs-continue and opschain docs cli/runs-reject — the other two answers.
  • opschain docs cli/runs-show — find the waiting step.
  • opschain learn 3.1 and opschain learn 4.1 — gates in the walkthroughs.