Windows: codex exec intermittently remains alive for ~60 seconds after turn.completed #30853
HadornMarcel
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Windows:
codex exec --jsonintermittently waits ~60 seconds afterturn.completedSummary
On Windows 11,
codex exec --jsoncan remain running for roughly one minute after it has already produced a valid response and emittedturn.completed.The model response itself arrives in a few seconds. The additional delay occurs before the local Codex process exits with exit code
0.Environment
0.142.5codex exec --jsongpt-5.4-minilowReproduction command
Expected behavior
codex.exeshould exit promptly after emittingturn.completed.Slow runs observed
Run 1 — analytics disabled
Post-completion delay: approximately 57.3 seconds.
Run 2 — same relevant command options, without the analytics override
Post-completion delay: approximately 66.6 seconds.
Impact
A Python application using
subprocess.run()blocks until Codex exits even though the model response is already available. This makes Streamlit and similar integrations intermittently 1+ minute slower than necessary.Possible area to investigate
The pattern suggests an intermittent Windows shutdown or cleanup problem after a completed Codex turn, such as process cleanup, event-loop shutdown, or connection teardown timing out.
All reactions