mirror of
https://github.com/openai/codex.git
synced 2026-11-09 20:50:33 +00:00
## Why A hung tmux command or a descendant holding stdout open can block terminal input setup indefinitely. ## What changed Run tmux option probes on a worker thread with a shared one-second deadline, returning default input options when the wait times out. Prevent overlapping probes and kill and reap commands that exceed the deadline. Capture stdout in a temporary file so completed commands do not wait for descendants to close it, and read at most 4 KiB of output. ## Testing Add Unix regression tests for successful output, killing and reaping a timed-out command, and returning promptly when a descendant keeps stdout open. GitOrigin-RevId: a5a4c9323a3e18d1baada5ab1cf3734ce6a9403a