[Windows App] Repeated PowerShell process creation leads to a system-wide hard freeze after 20–25 minutes
What version of the Codex App are you using (From “About Codex” dialog)?
26.715.4045.0
What subscription do you have?
ChatGPT Plus
What platform is your computer?
Microsoft Windows 11 Home Chinese Edition, Version 10.0.26200, Build 26200, x64 Hardware: CPU: AMD Ryzen 7 9850X3D 8-Core Processor GPU: NVIDIA GeForce RTX 5070 Ti 16 GB RAM: 32 GB Installation: Codex Windows desktop app
What issue are you seeing?
While the Codex Windows App was reading and analyzing a local project, it repeatedly created PowerShell-related processes or execution sessions.
After approximately 20–25 minutes of sustained activity, the entire system became completely unresponsive. All visible application windows and screen content stopped updating, and I could no longer interact with the taskbar, Start menu, desktop, or any open application.
The computer did not recover on its own, so I had to force a shutdown by holding the physical power button.
This occurred while using the Codex Windows desktop app. Codex CLI and Remote SSH were not in use.
The potentially relevant processes include:
powershell.exe
pwsh.exe
conhost.exe
Codex.exe
codex.exe
This may be related to #31236, but the symptom in my case affected the entire system rather than only Explorer, the taskbar, Start menu, or Alt+Tab.
The issue occurred twice on the same computer. Windows Event Viewer showed an unusually high number of PowerShell console startup events before both freezes:
First incident: 321 PowerShell console startup events within approximately 23 minutes.
Second incident: 777 PowerShell console startup events within approximately 24 minutes.
During the second incident, the startup rate peaked at 78 events in one minute.
During the first incident, 52 PowerShell Operational warning events were associated with repeated execution of the following command:
Get-CimInstance Win32_Process |
Select-Object ProcessId, ParentProcessId |
ConvertTo-Json -Depth 2
The recorded error was:
HRESULT 0x80041006 — Out of memory
New PowerShell console startup events continued to be recorded after these errors occurred.
What steps can reproduce the bug?
Start the Codex Windows desktop app.
Open a local project containing multiple source files, documents, images, or other project assets.
Ask Codex to read and analyze the project files.
Allow Codex to execute local commands through PowerShell.
Continue using the local thread while Codex reads files and executes commands.
Run multiple Codex execution contexts or sub-agents.
PowerShell console startup events begin accumulating rapidly.
After approximately 20–25 minutes, the entire Windows system becomes unresponsive.
The system does not recover and requires a forced shutdown.
Reproducibility:
Occurrence count: 2
Frequency: Intermittent; observed twice
Approximate time before freeze: 20–25 minutes
Simultaneous PowerShell process count: Unknown
PowerShell startup events before the first freeze: 321
PowerShell startup events before the second freeze: 777
Peak startup rate during the second incident: 78 events per minute
Remote SSH connection in use: No
Codex CLI in use: No
Multiple Codex execution contexts or sub-agents running: Yes
Active Codex execution contexts detected before the second incident: 5
What is the expected behavior?
Codex should limit PowerShell process creation and correctly clean up PowerShell-related child processes after local commands finish.
Reading or analyzing a local project should not cause excessive PowerShell process creation, resource exhaustion, Windows Shell instability, or a system-wide freeze.
If a command fails, times out, or encounters a WMI error, its associated powershell.exe, pwsh.exe, and conhost.exe processes should be terminated correctly.
Codex should also avoid repeatedly starting new PowerShell processes for process-tree enumeration or command-status polling when the same operation can be performed without continuously creating new processes.
Additional information
Possibly related issue:
#31236 — Windows Codex app freezes taskbar / Alt+Tab / Explorer when repeatedly spawning PowerShell and querying Shell icons
Differences observed in my case:
The entire display and all open applications became completely frozen.
The system could not be recovered by restarting Explorer.
A forced hardware shutdown was required.
The issue occurred twice after sustained Codex activity.
A high volume of PowerShell startup events was recorded before both incidents.
WMI process enumeration produced repeated out-of-memory errors during the first incident.
Approximate incident times:
2026-07-19 00:52:58 UTC+08:00
2026-07-19 02:04:00 UTC+08:00
Relevant Windows Event Viewer records:
Kernel-Power Event ID 41 after the forced shutdown: Present after both incidents
EventLog Event ID 6008: Present after both incidents
Application Hang or Application Error events: No relevant pre-freeze events found
Windows Error Reporting events: No new incident-specific crash report or dump generated
PowerShell Operational events: Present
PowerShell console startup events: 321 before the first incident and 777 before the second
PowerShell Event ID 4100 warnings: 52 during the first incident
Error reported by the warnings: HRESULT 0x80041006
Resource-Exhaustion-Detector Event ID 2004: Not present
WHEA hardware errors: Not present
New display-driver recovery errors: Not present
New crash dump or LiveKernelReport: Not generated for either incident
The Kernel-Power records reported:
BugcheckCode = 0
This indicates that neither incident completed as a recorded Windows bugcheck or blue-screen crash.
I can provide exported Event Viewer logs, PowerShell Operational event details, and additional process information if required.
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗