mirror of
https://github.com/openai/codex.git
synced 2026-10-19 17:28:46 +00:00
## Why Appending directly to a non-empty rollout that lacks a trailing newline joins the next JSON object to the existing record, producing invalid JSONL. ## What changed - Ensure non-empty rollout files end with a newline before opening them for append, including resumed, compressed, and direct append paths. - Perform the synchronous tail inspection outside the async runtime. ## Testing - Add a regression test covering newline repair and repeated opens. GitOrigin-RevId: a3ca84cc1fd3b811caa9f4c5c8761a4b5b791357