[Windows][26.721.4979.0] app-server disconnect/recovery causes full desktop app termination under concurrent tasks
Summary
Since updating the Windows Codex desktop app to 26.721.4979.0, concurrent or high-load tasks can cause the Codex app-server connection to fail. The automatic recovery appears to succeed briefly, but the desktop window then disappears and the entire app terminates, interrupting every active task.
This is a regression for this machine: similar concurrent workloads worked before the recent update.
Related exact-version report: #35311. The trigger here is not limited to in-app Browser use; it also occurred with PDF test execution and an Android Gradle build running concurrently.
Environment
- Codex desktop:
26.721.4979.0, x64 MSIX - OS: Windows 11 Home,
10.0.26200, x64 - CPU: Intel Core i9-12900K
- RAM: 127.7 GB
- Package update timeline:
26.721.3404.0->26.721.3996.0on 2026-07-2426.721.3996.0->26.721.4979.0on 2026-07-25- Repeated failures observed on 2026-07-28 KST
Reproduction patterns observed
Pattern A
- Start two separate, relatively small Codex tasks.
- Task 1 runs a full PDF regression/test suite.
- Task 2 runs an Android Gradle AAB build.
- Continue working in another Codex task.
- The app-server connection fails, recovery starts, and the entire desktop app terminates.
Pattern B
- Run an Android browser/DOM inspection task.
- In parallel, run an unrelated test/discovery task.
- Codex displays the Windows “ChatGPT stopped unexpectedly” screen or exits/restarts.
The issue has also recurred after moving work from older large threads into new small handoff threads.
Expected behavior
A failed tool, task, or app-server request should be isolated to that task. The desktop host should remain alive, and other tasks should continue running.
Actual behavior
The local app-server fails, the desktop recovery path briefly reconnects, then the main window lifecycle disappears and IPC breaks. All concurrent tasks are interrupted.
Relevant log sequence
Times below are UTC; local time is KST (UTC+9).
2026-07-28T14:48:49Z WARN stream disconnected - retrying sampling request
sampling_error="stream disconnected before completion: failed to send websocket request: Connection closed normally"
connection-failed code=3221225786 signal=null
2026-07-28T14:51:29Z AppServerConnection Restart requested
2026-07-28T14:51:33Z app_server_restart_recovery_done resumedCurrentConversation=true
2026-07-28T14:51:37Z IAB_LIFECYCLE route window is not live
2026-07-28T14:51:37Z IpcRouter Socket error errorCode=EPIPE errorMessage="write EPIPE"
2026-07-28T14:51:37Z Stopping app-server transport
A separate failure at approximately 2026-07-28 22:58:52 KST ended with the same IAB_LIFECYCLE window removal and EPIPE sequence.
Memory pressure ruled out for these failures
An external passive monitor recorded system memory every ~10 seconds. It never terminates Codex or changes process state.
For the 23:51 KST failure:
- 23:48:46: physical memory 16.40%, commit 18.62%
- 23:51:34: physical memory 20.63%, commit 21.48%
- More than 100 GB of physical RAM remained available
For the earlier 22:58 failure, physical memory was about 14–15% and commit was about 14%.
There was no Windows Resource Exhaustion event 2004 around the failures. Recent task transcripts were also small (roughly 1–3 MiB) and had balanced tool-call/tool-output records, so this is not the previously observed very-large-transcript/compaction case.
Additional observations
- The process exit/recovery failure leaves some child workloads, such as Gradle/Kotlin daemons, alive after the desktop app is gone.
- No matching Windows Error Reporting crash entry was produced for the observed termination.
- Reopening interrupted tasks can retrigger the app-wide failure.
- Raw task transcripts are not attached because they may contain private project content. Sanitized desktop log excerpts and a screenshot can be provided privately to OpenAI support.
Please investigate the Windows app-server recovery and renderer/window lifecycle path in 26.721.4979.0, especially the interaction between a failed sampling/WebSocket stream, app-server restart, browser-session window cleanup, and IPC client unregister/EPIPE handling.
5 Comments
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action
Additional single-thread reproduction (2026-07-29 KST)
This issue reproduced again with only one Codex workload active, so concurrent tasks are not required.
Environment remains Codex desktop
26.721.4979.0on Windows 11 x64.Timeline
Times below are UTC (KST = UTC+9).
The recovered thread was marked with its latest turn status as
interrupted; the running test result was lost.The
Unknown process id 86678was the most recent router error recorded in the app-server close reason. It occurred after attempting to poll an already-finished long-running command. A different, newly started process was active when the app-server exited. This is correlation, not proof that the stale process poll caused the exit, but it provides a narrower reproduction path:write_stdin.Unknown process id.Memory and transcript size
Memory pressure was again ruled out at the failure time:
The affected thread transcript was approximately 20.57 MiB / 4,577 lines, far below the previously observed pathological transcript sizes.
A later app restart also logged the already reported secondary lifecycle sequence:
The generated project artifacts remained intact, but final verification was interrupted. Please investigate whether stale unified-exec process polling or app-server recovery on Windows can terminate the host process instead of returning an isolated tool error.
怎么解决,我也是
Root cause narrowed: descendant process termination can take down the Windows app-server
I now have a deterministic local reproducer and a mitigation that removes the crash.
Stronger reproduction
Environment is unchanged:
26.721.4979.00.146.0-alpha.3.13221225786/0xC000013AThe failing workload was a Python/pytest suite that tests file-lock recovery with multiple subprocesses. The application code under test contained this Unix-style PID liveness probe:
Python's Windows documentation states that, except for
CTRL_C_EVENTandCTRL_BREAK_EVENT,os.killusesTerminateProcess; signal0is therefore destructive on Windows rather than a read-only existence probe:https://docs.python.org/3/library/os.html#os.kill
This project bug caused a descendant/sibling test process to be terminated. However, the Codex failure was not isolated to the tool invocation: the main Codex app-server also exited with
0xC000013A, all desktop tasks were interrupted, and the active turn was left without a tool result.I reproduced the same whole-app failure:
3/3; no unavailable server).CREATE_NEW_PROCESS_GROUP; Codex still terminated.Two affected full-suite tool calls were persisted without outputs. Desktop logs recorded:
The crash dialog again promoted an unrelated last WARN (for example, plugin
defaultPromptvalidation) as the apparent cause.Thread corruption ruled out
The original rollout was validated independently:
Therefore malformed rollout JSON was not the direct trigger in this reproduction.
Local mitigation and A/B result
I changed the Windows branch to bypass
os.killcompletely and use a read-only Win32 process query (OpenProcess+GetExitCodeProcess).A regression test now fails if the Windows path calls
os.kill.Before the fix:
After the fix:
The app-server remained alive, the original thread resumed, and subsequent tool executions completed.
Why this still appears to be a Codex Windows isolation bug
The project code's destructive Windows PID probe was a valid trigger that needed fixing. But a descendant tool process terminating another descendant should fail that tool or process tree only. It should not terminate the main Desktop app-server or every unrelated task.
Please investigate Windows unified-exec process-tree/job-object/console cleanup when a descendant process is terminated, including whether cleanup propagates a control event to the app-server. A useful regression test would run a tool that spawns two children, forcibly terminates one child, and verifies that the app-server and unrelated tasks remain alive.
Related reports with the same exit code and misleading last-WARN diagnostics include #21761.
Independent reproduction on a newer Windows Desktop build
I can independently reproduce the same failure mode on a newer Codex Desktop build, with the same project-side trigger described in the root-cause comment above.
Environment
26.727.6591.026.727.513510.146.0-alpha.9.2Trigger and timeline
A newly added Python unittest suite exercises a project lock's PID-liveness check:
The suite was invoked through Desktop custom
execthree times:Each invocation was persisted as a completed
custom_tool_call, but no matchingcustom_tool_call_outputwas written. The correspondingcodex.exe app-servergeneration disappeared within roughly 2–3 seconds and Desktop started a replacement process.The outer
ChatGPT.exeprocess remained alive and responsive throughout. I found:This matches the issue's distinction: the project has a real Windows bug that should be fixed, but termination/control events from a tool descendant should not take down the shared Desktop app-server.
Persisted task state after recovery
The affected rollout is valid JSONL but now has three unmatched custom tool calls. Reopening/resuming it logs:
This is also closely related to #32653. The thread can sometimes start another turn after restart, but running the same suite again repeats the app-server exit and adds another unmatched call.
Questions for maintainers
26.727.6591.0, or is this still an open app-server/unified-exec issue?For now I am avoiding the affected task and the triggering test command. I can provide sanitized process-span and SQLite log excerpts if useful.