opschain admin queue terminate
Included from Basic tier
Terminates the queue entries a run id holds by cancelling the owning work
item through its own lane: run cancel for a change or workflow run,
the task abort for a node background task. The queue row is never deleted
out from under the scheduler — the cancel propagates and the scheduler
clears its entries itself (a parked entry is discarded, a leased runner is
directed to abort on its next renewal). Every termination writes a
customer-visible api:admin_queue:terminate audit event naming the
administrator, the queue entries and the owning item, joined to the owner's
correlation chain.
opschain admin queue terminate <run-id>
<run-id> is the entry's RUN column from opschain admin queue list — the
owning change / workflow run id, or the node background task id. Every
entry the run holds terminates together: termination cancels the owner,
not one row. Placement is resolved once at enqueue, so
terminate-and-recreate is also the remedy for a mis-placed entry.
Flags
| Flag | Meaning |
|---|---|
--server <url> | Server base URL (default: the active context / OPSCHAIN_SERVER). |
--auth-token <token> | Admin bearer token override (default: your opschain login session, then $OPSCHAIN_ADMIN_TOKEN, then the token stored by opschain admin login). |
Admin-token gated like opschain admin queue (the /admin updatable
grant). -o json|yaml prints the terminated entries and the lane.
Exit codes
| Code | Meaning |
|---|---|
| 0 | Termination accepted; stdout names the lane (run_cancel or task_abort). |
| 1 | Refused — no such entry (not_found), the owner cannot be resolved, or the owner is already finalised (failed_precondition; clear the leftover row with opschain admin queue sweep). |
| 2 | Usage error — missing run id, server or token. |
Examples
opschain admin queue terminate 01a1f3c2-... --server https://ops.example.com
terminated 01a1f3c2-... via task_abort (1 queue entries)
See also
opschain docs cli/admin-queue-list— find the entry and its owner.opschain docs cli/admin-queue-sweep— entries whose owner is already finalised.opschain docs cli/runs-cancel— the same cancel lane, addressed by run.