Oko/Docs

Command reference

oko tasks leftovers

The work the sessions that stopped in the last N hours left behind, read where each kind is recorded, with the command that takes it over; nothing is recovered or copied under another identity.

Invocation#

Command
oko tasks leftovers --hours N [--json]

Inputs and options#

  • --hours N, a whole number, required: every session written in the last N hours that no process holds, as `oko sessions agents --hours N` reads them, with the tasks of the same window.
  • In Oko Desktop, the Tasks screen's Left behind toolbar button asks for the hours and reads the same document; the native API's tasks `leftovers` ({hours}) answers it.

Output and state effect#

  • Reads only. Prints `{hours, holderFailure, brokerFailure, stopped, unread}`. Each stopped session is `{session, lastWrite, state, role, supervisor, tasks, edits}`: `tasks` lists every task Oko shows claimed by it and not done, each with its place, `leader` (who claims it now, which for a stopped session is still itself until someone claims it over), `change` (the commit its evidence names: exists, pushed to which refs, review, as `oko tasks stages` reads it) and `takeover`, the exact command: `tama stage --session <leader> --with <stopped> --task <task> --repo <checkout>` when another session leads the task, else `oko tasks claim <task> --by <session>` first; `edits` lists, for the checkout the session worked in and every repository its tasks' contracts are scoped to, what `tama stage --session <stopped> --repo <checkout> --inspect` reads of its uncommitted edits (paths, omitted, tree) or why it could not be read.
  • A session whose state is unread (no holder seen while the broker's terminals could not be read, holderFailure) is left out, not read as stopped; a row that cannot be read as a session is in `unread` with its cause.

Refusals and safe exits#

  • `oko tasks leftovers requires --hours <whole number>`; every refusal of `oko sessions agents` and of the tasks report it reads.

CLI reference#