You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
app-server websocket shared-thread turns complete but rollout never materializes, so sibling thread/resume fails with "no rollout found" #16872
What you're describing should work, so this does sound like a bug. Thanks for reporting it.
I asked codex to investigate. It wrote a small app server client that attempts to replicate the steps you've described above, but it wasn't able to duplicate the behavior you're seeing. It was able to theorize a potential cause, but it involves pretty obscure error cases that strike me as pretty implausible.
Perhaps you could ask codex to do something similar to what I did — to write a minimal test case that exercises the app server API via a web socket? If you're able to repro the problem in that way, perhaps you could then share the test case with me?
Alternatively, you could clone the codex code, build it from source, and ask codex to debug the issue on your machine directly.
I took a quick look at this locally, and one thing that stood out is that the app-server terminal turn path seems different from the shutdown path.
From what I can tell, TurnComplete notifies clients, but does not appear to force rollout materialization/flush. The shutdown path does call rollout materialization/flush. That seems consistent with the issue showing up more clearly in long-lived shared websocket sessions, where shutdown may not happen soon after the turn completes.
I tried a small local patch that materializes/flushes the rollout after terminal turn events in app-server event handling, and cargo check -p codex-app-server passes locally. Not sure if this is the intended fix direction, but wanted to share the observation in case it helps.
Activity
github-actions commentedon Apr 5, 2026
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action
etraut-openai commentedon Apr 6, 2026
What you're describing should work, so this does sound like a bug. Thanks for reporting it.
I asked codex to investigate. It wrote a small app server client that attempts to replicate the steps you've described above, but it wasn't able to duplicate the behavior you're seeing. It was able to theorize a potential cause, but it involves pretty obscure error cases that strike me as pretty implausible.
Perhaps you could ask codex to do something similar to what I did — to write a minimal test case that exercises the app server API via a web socket? If you're able to repro the problem in that way, perhaps you could then share the test case with me?
Alternatively, you could clone the codex code, build it from source, and ask codex to debug the issue on your machine directly.
decleezy commentedon Apr 6, 2026
thank you @etraut-openai
I packaged a minimal standalone websocket repro and ran it against a fresh local app-server on
codex-cli 0.117.0.Setup:
codex app-server --listen ws://127.0.0.1:9895WebSocketWhat the script does:
initializethread/startturn/startwith valid V2UserInput[]turn/completedOne repro run produced:
019d62ef-a95d-7742-952a-43ac59aa6733019d62ef-aa93-7ec0-b34e-b76b3dcb2213/Users/.../.codex/sessions/2026/04/06/rollout-2026-04-06T08-16-06-019d62ef-a95d-7742-952a-43ac59aa6733.jsonlThe turn completed successfully, but the rollout still did not exist on disk afterward:
rollout_exists: falseThe app-server logs also emitted repeated errors during the run:
decleezy commentedon Apr 6, 2026
Here is the minimal standalone websocket repro script I used locally against codex-cli 0.117.0.
etraut-openai commentedon Apr 9, 2026
Thanks for the script. Unfortunately, I'm still not able to repro the problem — at least not with the latest main branch.
YingzuoLiu commentedon May 23, 2026
I took a quick look at this locally, and one thing that stood out is that the app-server terminal turn path seems different from the shutdown path.
From what I can tell,
TurnCompletenotifies clients, but does not appear to force rollout materialization/flush. The shutdown path does call rollout materialization/flush. That seems consistent with the issue showing up more clearly in long-lived shared websocket sessions, where shutdown may not happen soon after the turn completes.I tried a small local patch that materializes/flushes the rollout after terminal turn events in app-server event handling, and
cargo check -p codex-app-serverpasses locally. Not sure if this is the intended fix direction, but wanted to share the observation in case it helps.