mirror of
https://github.com/openai/codex.git
synced 2026-09-10 20:26:47 +00:00
## Why Code-mode `exec` and `wait` can use the same yield duration as an awaited nested tool call. Because the outer timer starts first, it can expire just before the nested result arrives, forcing an otherwise unnecessary continuation and extra `wait` call. ## What changed - Add a one-second internal grace period to code-mode `exec` and `wait` yield timers only when the configured yield is at least 10 seconds. - Keep the model-visible yield values, defaults, and accepted parameters unchanged. - Preserve exact timing for explicit short yields, including the immediate-yield `0` case. - Cover the 10-second threshold and nested-tool behavior through both `exec` and `wait` with virtual-time tests instead of slow wall-clock integration tests. ## User impact Nested calls using the 10-second default (or a longer configured yield) get one extra second to return through the current code-mode call instead of needlessly yielding the outer cell. Sub-10-second yields retain their existing timing. ## Test plan - `just test -p codex-code-mode`