Skip to main content
Version: v5.6.1

opschain admin runner forget

Included from Basic tier

opschain admin runner forget <runner-id>

Forgets a stale registration (the v2 RunnerService.ForgetRunner RPC) so the listing stays clean and the identity may re-register later. Forgetting is housekeeping, not revocation: the runner's credentials are not invalidated, and the same identity is free to enrol again.

The server refuses to forget a runner that is still online, or that holds a live job binding — drain it, let the work finish, and stop it first. The intended sequence for retiring a runner is therefore drain → stop → forget.

Flags​

FlagMeaning
--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.

Output​

The server's acknowledgement, as JSON (-o yaml for YAML):

{
"forgotten": true,
"id": "<runner-id>"
}

An info:runner:forgotten event records who forgot what.

Exit codes​

0 forgotten; 1 the request failed or was refused; 2 usage.

Named errors​

  • a server is required — pass --server <url>, set OPSCHAIN_SERVER, or 'opschain context use <name>' (exit 2)
  • this command needs a login or an admin token — run 'opschain login', pass --auth-token, set OPSCHAIN_ADMIN_TOKEN, or store one with 'opschain admin login' (exit 2)
  • the server rejected the credential — run 'opschain login' again, or check the admin token (exit 1)
  • runner holds a live job binding: drain it and let the job finish before forgetting it — 409 conflict, passed through (exit 1).
  • runner is online: stop or drain it before forgetting it — 409 conflict, passed through (exit 1).
  • An unknown (or already-revoked) id reports the server's 404 (exit 1).

See also​

  • opschain docs cli/admin-runner-drain — the step before forgetting a live runner.
  • opschain docs cli/admin-runner-group-delete — a group cannot be deleted while registered runners still reference it; forgetting them is how that reference clears.
  • opschain docs fleet-queue — the info:runner:forgotten event in the events vocabulary.