Skip to main content

Module codex

Module codex 

Source
Expand description

Codex HarnessAdapter — Rust port of packages/cli/src/harnesses/codex.ts.

Codex shares the pending-stamp + watch-loop shape with OpenCode, so the adapter is constructed via super::pending_stamp::session_store_adapter instead of re-implementing the trait. The only codex-specific bits are:

  • name = "codex" — the dispatch key and log-line label.
  • session_root$HOME/.codex/sessions, resolved lazily so tests that override $HOME see the override.
  • ingest_sessions — defers to relayburn_sdk::ingest_codex_sessions, the codex-only ingest pass. The factory opens a fresh ledger handle per call (mirrors the TS lock-then-write-then-close shape; SQLite WAL keeps the per-tick open cheap).

Functions§

adapter
Hand out a &'static dyn HarnessAdapter for codex. The registry calls this once at lazy-init time. See pending_stamp::session_store_adapter for the leak semantics.