Oko/Docs

Command reference

oko routines execute

Runs the Oko operation a Stado schedule fired; this is the command every Oko schedule holds, not one to type.

Invocation#

Command
oko routines execute --definition BASE64

Inputs and options#

  • The base64 definition Stado's schedule carries, and the job identity Stado sets as WC_JOB_ID.

Output and state effect#

  • Context reads the context snapshot with the limit its definition states. Autonomy runs one autonomy tick, claimed at most once in ~/.oko/routines/executions.sqlite: a repeated occurrence hands back its earlier receipt instead of acting again. Control runs one control pass over the recent sessions and keeps it in oko_control_passes. Telemetry publishes the member's last days, as many as its definition states, as their work_telemetry_snapshot row. Reflection attempts its Lake scan, queued model judgment, executor review and signal improvement independently, so an older queued reading can progress after a new scan refuses. A supervision occurrence settles previously sent instructions independently of whether new executor dispatch is admitted.
  • The receipt is written to output/routine-result.json, Stado's artifact for the job, and printed.

Refusals and safe exits#

  • A stored definition that cannot be decoded retains the exact base64 decoding cause or routine-JSON parser/schema cause, rather than combining both into a generic invalid-definition message. Invalid input refuses before any job starts or execution receipt is written. Schedule listing, inspection and execution use the same decoder; Desktop displays the resulting invalid-routine cause.
  • UUID validation names the supplied ID and the UUID parser's actual cause through the shared CLI/native definition validator. The routines-inspection journey takes a genuine stored routine definition, changes only its ID to an invalid value, and checks the real execute refusal before job execution; it does not fabricate a provider response or execution receipt.
  • Without WC_JOB_ID it refuses: use routines run or resume. An interrupted or failed autonomy claim refuses to act again. A context or telemetry definition written before limits and days were stated fails its receipt with “this context routine's definition states no limit” or “this telemetry routine's definition states no days”. A reflection failure receipt names each failed phase even after independent phases progressed; a failed supervision dispatch still attempts instruction settlement and the failed receipt names both outcomes. A failed operation writes a failed or refused receipt with the error and exits nonzero.

CLI reference#