Skip to main content

parse_codex_logs

Function parse_codex_logs 

Source
pub fn parse_codex_logs(
    logs: &[CodexLog],
    mode: ParseMode,
) -> Result<CodeAnalysis>
Expand description

Parse Codex session records from a slice of pre-typed logs.

Walks the records in order, threading function and custom-tool calls to their outputs and folding token usage from token_count events. Returns a single-record CodeAnalysis with the runtime metadata fields blank (the caller’s finalize step fills them).

§Errors

Returns anyhow::Result for parity with the other provider parsers, but has no fallible step: malformed arguments and outputs are tolerated (skipped or substituted), so it returns Ok for any slice.