#221
fix: parse Codex saved-session transcripts
Summary
When codex exec --json produces no JSONL, the runner falls back to a saved session. Its wrapped records do not match the stdout schema, so the parser reports zero activity even when commands ran.
- Translate paginated completed items through the existing Codex parser, skipping duplicate
response_itemrecords. Match Codex's command quoting and display masking. - Without a stdout thread ID, require one new session with source
exec. Exclude the shell canary and child agents instead of choosing by filename. - For unsupported Codex activity, omit
result.json.o11yand exposeo11y: nullto EVAL.ts. Preserve usage and raw/parsed transcripts, including when a legacy session contains a terminal error. - Add optional top-level EVAL
results.usageso token assertions still work without an activity summary. Existingo11y.usageand runner-reported usage precedence are preserved.
Saved sessions cannot recover missing in-flight commands or stdout-only retry notices, and error counts can differ between sources. Other agents retain their existing summary behavior. If useful, I can follow up separately with a general missing-summary contract; custom-agent parser selection in #217 is separate.
README updated and a minor changeset included for the added EVAL usage field.
Tests
- Regression tests failed before the fixes. Coverage checks deduplication, command outcomes and masking, legacy failures, canary/child/ambiguous session selection, usage, and the actual EVAL context and saved artifacts. Runner tests use the existing local sandbox support with a stand-in Codex executable.
- Node 24.11.0:
npm testpassed (596 passed, 17 skipped), including Docker tests. Credentialed integration tests were disabled.npm run build,npm run lint, andgit diff --checkpassed. - Also checked captured Codex CLI 0.162.1 stdout and saved sessions from a deterministic localhost Responses API fixture. No live model service was used.
Closes #190.