- Goal: Retrieve recent masked session summaries across every streamed runtime, single out conversations left unfinished, and locate events containing literal text.
- Risk: Read-only for the documented query; external DuckDB process.
- Environment: macOS terminal, valid Lake partitions, DuckDB CLI
1.5.xonPATH. - Preconditions: At least one committed session for a non-empty result.
- Inputs: Selected Lake, optional runtime/project/session/type filters, a literal search term, and a bounded limit.
- Artifacts and side effects: Transcript Lake writes nothing. DuckDB reads NDJSON through the pinned
sessionsandeventsviews and formats rows or JSON. - Steps:
sh
LAKE="/absolute/operator-owned/lake"
transcript-lake --data-dir "$LAKE" sessions --limit 20
transcript-lake --data-dir "$LAKE" sessions --runtime codex --project wisent --limit 20 --json
transcript-lake --data-dir "$LAKE" sessions --interrupted --limit 20
transcript-lake --data-dir "$LAKE" search "ssh" --limit 20
transcript-lake --data-dir "$LAKE" search "100%" --runtime codex --json
transcript-lake --data-dir "$LAKE" query --json "SELECT * FROM tokens_daily ORDER BY day DESC LIMIT 20"- Verification:
sessionsexposes runtime-native identity, project, message/tool counts, token counters, and span. Runtime is part of identity, so equal native IDs from different providers remain separate.sessions --interruptednarrows the same listing to conversations whose last turn was an unanswered user message or a tool call cut off mid-run, replacing the token columns withstopped_asandlast_user_text; a Lake in which every conversation ended on an agent reply yields an empty result with a zero exit.searchreturns the newest events whose masked text contains the term, treating%and_as literal characters rather than wildcards; a term absent from the Lake yields an empty result with a zero exit.queryremains available for documented or operator-owned advanced SQL. - Failure path: Missing DuckDB names the unavailable dependency and exits non-zero. Invalid runtime or out-of-range limit fails before DuckDB starts or Lake state changes.
- Cleanup or off-switch: None for this read-only query. Remove any shell redirection output only if the operator created it and no longer needs it.
- Next: Run a documented view such as
tokens_dailyor use cross-source signals.