Command reference
oko context refresh
Refreshes Oko’s searchable local cache of the team’s chat workspace.
Invocation#
oko context refresh [--full] [--channel-page-limit N] [--max-rows N] [--output PATH]Inputs and options#
- --full rebuilds instead of incrementing; page/row limits bound collection; --output overrides the JSONL cache path.
Output and state effect#
- Fetches channel/thread messages, deduplicates/prunes them, writes JSONL, and prints a JSON summary.
Refusals and safe exits#
- Refuses --token and a missing exact oko-slack credential; top-level refresh/write failures exit unsuccessfully while per-channel failures are reported and skipped.
- An incremental refresh reads the existing cache first: only a cache that does not exist yet is empty. A cache that cannot be read is refused with `cannot read the chat cache <path>: <cause>`, and a line that is not a JSON object with `the chat cache <path> holds a line that is not JSON (<line>): <cause>` or `… is not an object: <line>`; the cache is left as it is and nothing is written, so an unreadable cache is never replaced by the new messages alone.