pub fn find_codex_result(ndjson: &str) -> Option<AgentResult>Expand description
Extract a structured AgentResult from Codex NDJSON output.
Finds item.completed events with type:agent_message for the result text.
Checks for turn.failed, error, and item.completed error events.
Returns None only if no parseable NDJSON events are found.