Command reference
oko tasks close
Records the operator's own completion verdict without a model. It cannot bypass source-bound behavioral qualification; unsupported done remains claimed and open.
Invocation#
oko tasks close (<session> <number> | <task-id>) --reason TEXT [--by operator]Inputs and options#
- <session> <number> or <task-id> names the task as oko tasks prints it.
- --reason says how the task was done; it is kept as the verdict’s reason.
- --by may only be operator, which is also the default.
- Run `cargo test --manifest-path rust/Cargo.toml --test native-api-journey wrong_native_confirmation_preserves_the_inspected_task -- --ignored --nocapture`. Declare OKO_TEST_SOURCE_REVISION, OKO_TEST_CLOSE_TASK and OKO_TEST_FIXTURE_SESSION for a dedicated real task with a live transcript and a signed-in database. The actual resident API receives a mismatching identity, must expose both observed identities and refuse, and a separate CLI read must show the task unchanged. The fixture retains source/binary evidence, API exchanges, command exits and process state under .build/api-*. It never submits a matching confirmation.
- A failed native qualification returns an error instead of substituting an API answer. Its report records a failed service start or the actual socket connect, request write, response read or JSON decode operation and cause. Response bytes are retained before decoding, except when they expose a submitted provider key; that refusal retains no exposed response. These transport failures do not count as a successful product refusal.
Output and state effect#
- Prints the task's identity and complete request text on /dev/tty and asks for its id. A matching confirmation records a done verdict and prints `has an operator completion claim`; the next read derives verified only from source-bound behavioral receipts and observed acceptance. Otherwise `claim.cause` explains why status is not done and it remains in handover. Oko Desktop's Tasks Close sheet uses the same action and displays the derived standing after refresh.
Refusals and safe exits#
- Refuses without --reason, with an empty reason, or with --by naming anyone but operator (“oko tasks close is the operator's own act, not <by>'s”). Run with no terminal — from a pipe, a hook or an agent’s tool call — it refuses with “oko tasks close records the operator's own decision and is confirmed on the terminal it runs from; this process has no terminal (<error>), so nothing was recorded”. A typed answer other than the task id refuses with “the terminal answered "<answer>", not <id>; nothing was recorded”. Nothing is written on any refusal.