Command reference
oko sessions messages
Everything one session's transcript says, whole and in order: each text it wrote, each tool call with its arguments, each tool result with its text and whether it is an error, each message it was sent and each stop refusal it received, untruncated. A supervisor reads an executor's answer here instead of selecting lines from its screen or transcript; an executor that may write no text answers through its tool calls, so they are printed too.
Invocation#
oko sessions messages ID [--since TIME] [--json]Inputs and options#
- ID is the session id; every transcript of that session under the harness roots Oko reads is read, oldest first.
- --since TIME keeps the records written at or after TIME, an RFC 3339 time such as 2026-01-01T08:00:00Z.
Output and state effect#
- Prints each entry as `<time> <kind> [<tool>] [(error)]`, its whole text, and one `call <tool> <arguments>` line per tool call; with --json, {session, since, messages: [{at, kind, text, calls, tool, call, error}], unread}. Nothing is changed.
Refusals and safe exits#
- A missing ID refuses with “oko sessions messages requires <id>” (exit 2).
- A --since that is not RFC 3339 refuses with “oko sessions messages --since takes an RFC 3339 time such as 2026-01-01T08:00:00Z; <value> is not one: <cause>” (exit 2).
- A session with no transcript on this machine refuses with “no transcript of session <id> is on this machine under the harness roots Oko reads”; a record whose timestamp is not RFC 3339 refuses naming the file and the value.
- A line that is not a record, or a record without a timestamp when --since is given, is named under unread, never dropped.
- The real journey in tests/review/messages.rs (`cargo test --manifest-path rust/Cargo.toml --test review-messages`) runs the built CLI in a home of its own over an OMP transcript holding an operator message, a text, a tool call, a refused and a run result and a stop refusal: every one is printed whole and in order, --since keeps only the later records, and the refusals above name their cause.