Skip to main content

parse_codex_line

Function parse_codex_line 

Source
pub fn parse_codex_line(line: &str, model: &str) -> Vec<AgentEvent>
Expand description

Parse one stdout line into zero or more AgentEvents. model is the configured model, used both as the Init fallback (codex’s thread.started carries no model field in observed output) and as the pricing key when a terminal event has no CLI-reported dollar cost.

Unparseable lines become AgentEvent::Other with raw = {"unparsed": <line>} so nothing is ever dropped from transcripts.