Expand description
Codex: ~/.codex/sessions/YYYY/MM/DD/rollout-<ts>-<id>.jsonl.
A rollout is two interleaved logs sharing the {timestamp, type, payload}
envelope: response_item (the protocol log the model sees) and event_msg
(the display log the TUI replays). to_common runs the same stateful
aggregation the CLI provider does — turn/model/usage backfill, web-search
call/result pairing, and dedup of the duplicate function_call_output that
shadows a canonical exec_command_end/custom_tool_call_output. Tool names
are normalized to canonical (exec_command/shell → Bash, apply_patch →
Edit/Write/ApplyPatch).
from_common emits both response_item and event_msg logs so Codex can
resume and replay the session. It also emits turn_context, token_count,
and task_complete records for model and usage metadata.
Structs§
- Codex
- The Codex harness marker.
- Codex
Store - Reads and writes Codex rollouts under a sessions root (default
~/.codex/sessions). - Line
- One rollout line. Every codex line shares this envelope; the
payloadis kept as faithful JSON so native ↔ disk round-trips losslessly.