mirror of
https://github.com/openai/codex.git
synced 2026-10-24 13:54:49 +00:00
## Why Writing hook input before draining output can deadlock when pipe buffers fill. Stdin writes also ran outside the hook timeout, allowing hooks that never read input to hang indefinitely. ## What changed Write stdin concurrently with draining stdout and stderr, and apply the configured timeout to both input delivery and command completion. Preserve handling of broken pipes and distinct stdin and wait errors. ## Testing Add a regression test that sends a large input to a hook that fills stdout and stderr without reading stdin. Verify that output drains and the hook reports its configured two-second timeout. GitOrigin-RevId: 48cf33a2acfebbc5122a4522660d7a6b3fb1e9b0