Keep Codex Progress Out of Your Parsed Result
An automation should not mistake a progress update for its final report. Choose the output channel your parser actually needs.
The documented codex exec flow sends progress to stderr and the final agent message to stdout. Its JSON mode produces an event stream instead. Treat those as different interfaces: a JSON Lines stream needs event handling, while a final artifact needs validation against the shape your next step expects.
Try a small repository-summary task and capture the channels separately. Then test a failed run and a result missing a required field. Your automation should stop with a clear error instead of publishing partial prose because some output appeared. Keep a human-readable failure record alongside the machine-readable result.