mirror of
https://github.com/openai/codex.git
synced 2026-10-19 17:28:46 +00:00
## Why A local command can exit while a descendant keeps its inherited output pipes open, delaying `exec_command` completion and turn completion. ## What changed Start the bounded output drain when a local exec-server process exits, whether exit is reported by an event or recovered through `process/read`. Remote execution continues waiting for output closure so buffered or delayed output is retained. ## Testing Add regression coverage for local shell snapshot execution completing before a descendant releases stdout, preserving the foreground output and exit code. Add remote event-stream cases that retain output arriving after both reported and recovered process exit. GitOrigin-RevId: d38bcd394be42cf48d2af02733e883b02d1dd62f