Oko/Docs

Command reference

oko requirements read

Reads every session transcript that changed since the last pass: cuts it into windows around each of the operator's messages, keeps each window's digest and embeds every message he and the agent wrote in Oko's own meaning index. The standing routine transcript-requirements runs it every minute, so it never has to be run as a one-off.

Invocation#

Command
oko requirements read [--session ID]... [--json]

Inputs and options#

  • Every session transcript under the harness roots Oko reads (OMP, Claude Code, Codex, Jeden, Kimi Code and the other harnesses Oko's one transcript decoder reads) is read oldest first by creation. A file is a session's transcript where the operator ledger finds one: at its root's declared depth, or at a harness's declared session path; a subagent's file kept in its parent's folder, or a harness's other files beside the session's transcript, hold no turn of his and are counted as passedOver. The operator's messages are the turns the task ledger reads as his; every message he and the agent wrote, every tool call and every tool result is part of what a window shows, a tool call and result as its head and tail.
  • Oko runs no model for the reading and asks no other product: the judgment of a window is the agent session's that takes it, the model that session already runs on.
  • --session ID (repeatable) reads only the sessions named, whole or by the prefix `oko` prints.
  • The values that shape a reading (the window size, how much of a tool result and of a long message a window shows, how many open items of earlier sessions a window is asked about, how many windows a take hands, how many held requirements it shows, how many transcripts are read at once, and the embedding model with its pinned files and digests) are declared in the product's requirements.json, each with its reason.

Output and state effect#

  • Each changed transcript is decoded; each of his messages opens a segment that runs to his next one, and segments share a window while it fits the declared size, a window opening with the agent's last text before it. A segment too large alone is shown whole, then without its tool calls and results, then with the agent's texts cut to their excerpt, then with only his message and the agent's last text; what is left out is named by index in the window. Each window keeps a digest derived from its records and the hash of what it shows; a window whose words did not change keeps the reading a session submitted for it.
  • The meaning index embeds each of his messages by its sentences and whole, and the agent's messages by passages, read the way he types (lowercased, diacritics folded), with the static embedding model Oko runs itself; a vector is kept by message index, place and digest of its words.
  • Everything is kept under OKO_REQUIREMENTS, else Oko's state directory: transcripts/<session>-<path digest>.json (the transcript as read, his message indices, each window with its digest, reading, the session holding it and why its last submission was refused), the .vectors file beside it, and register.json (the merged requirements). A pass over every session drops the readings of files that are no longer a session's transcript. Prints transcripts, passedOver, pruned, decoded, unchanged, windowsBuilt, windowsWaiting, embedded, embedder and unread.

Refusals and safe exits#

  • An embedding model that is not installed leaves each transcript not indexed with `the embedding model <name> is not installed in <folder>: run `oko requirements embedder install``, named in status; windows still run.
  • `oko requirements: no transcript of session <id> is under the harness roots Oko reads (<roots>)` exits 1. A pass started while another runs prints {running, lock} naming who runs it and changes nothing. An unknown flag exits 2.

CLI reference#