Skip to content

[Windows App] Repeated PowerShell process creation leads to a system-wide hard freeze after 20–25 minutes #34050

Open

Description

@Ray-315

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.

Activity

  1. added
    appIssues related to the Codex desktop app
    on Jul 18, 2026
  2. added
    bugSomething isn't working
    windows-osIssues related to Codex on Windows systems
    subagentIssues involving subagents or multi-agent features
    tool-callsIssues related to tool calling
    on Jul 18, 2026
  3. CAPTW commented on Jul 19, 2026

    @CAPTW

    I can reproduce a closely related progressive failure on the same
    Codex Desktop version, 26.715.4045.0, and Windows 11 build 26200.

    One Ultra session initially continues to make progress, with up to
    approximately five subagents. While it is active, unrelated Codex
    sessions using different models and different tools become delayed
    or fail to start. Over time, the Ultra session itself also begins
    experiencing tool timeouts.

    The failure is Codex-specific: during the same degraded period,
    Claude Code continues to operate normally on the same machine and
    the same local repository, including PowerShell, cmd.exe, Git Bash,
    file operations, and Git commands.

    A controlled diagnostic also found:

    • external cmd.exe echo: 20.979 ms
    • external PowerShell 5.1 -NoProfile: 15.027 s timeout
    • Codex-integrated cmd.exe echo: about 10 s, exit 124
    • Codex-integrated trivial file read: about 10 s, exit 124
    • repeated Get-CimInstance Win32_Process process-monitoring path
    • process-monitor timeout: 5 seconds
    • repeated PID matching attempts and serialized pending mutations

    A reboot temporarily restores normal PowerShell and Codex operation
    without clearing chat_processes.json.

    This appears related to #34050, #34026, #32714, and #32562, but adds
    a cross-session starvation control and a same-repository Claude Code
    control showing that the repository, disk, Git, and shell executables
    remain operational.

  4. Ray-315 commented on Aug 4, 2026

    @Ray-315
    Author

    Update — 2026-08-04: Browser / Windows app discovery appears to trigger the PowerShell process storm

    I reproduced the same system-wide hard-freeze for a third time, and this incident provides significantly more precise evidence about the trigger.

    The new evidence strongly suggests that the failure path is associated with the Codex Browser / Windows application discovery component, rather than with the project code itself or ordinary terminal command execution.

    Incident summary

    At approximately 2026-08-04 22:49:20 UTC+08:00, Codex was operating a local web application in:

    F:\Quant
    

    Immediately before the freeze, the bundled Browser runtime was active and Codex was interacting with a locally hosted page.

    Observed PowerShell activity during the incident:

    • PowerShell console startup events: 523
    • Unique PowerShell PIDs observed: 467
    • Peak startup rate: 67 starts per minute
    • PowerShell warning events: 137
    • The 137 warnings were concentrated between 22:48:37 and 22:48:39
    • The abnormal shutdown occurred approximately 41 seconds later
    • Active Codex execution contexts at the time: 4

    To clarify: 523 does not mean that 523 PowerShell processes existed simultaneously. It means that 523 PowerShell startup events were recorded during approximately 39 minutes, involving 467 distinct PIDs.

    Codex task involved

    Task ID:

    019fcd0d-3241-7ac1-99a1-d934182803c0
    

    Working directory:

    F:\Quant
    

    Codex process PID:

    36312
    

    Immediately before the system freeze, Codex was performing the following operations:

    1. Starting:
    npm --workspace apps/web run dev
    
    1. Connecting to:
    http://localhost:3000/
    
    1. Initializing the bundled Browser runtime.
    2. Taking control of the browser tab.
    3. Capturing screenshots.
    4. Enumerating browser tabs and Windows applications/processes.

    PowerShell script involved

    The encoded PowerShell script associated with the warnings was safely decoded.

    It performed operations equivalent to:

    • Get-StartApps
    • Reading Explorer UserAssist registry data
    • Get-Process
    • Reading executable paths for running processes
    • Matching installed applications against running processes
    • Serializing the resulting application/process data to JSON

    This appears to be Windows application discovery functionality used by the Browser / desktop-control layer.

    The incident therefore appears to follow this pattern:

    Codex Browser / desktop automation
        -> Windows application/process discovery
        -> repeated short-lived PowerShell invocations
        -> rapid polling / retry / parallel execution
        -> PowerShell process storm and warning burst
        -> system-wide resource exhaustion or Windows instability
        -> complete hard freeze
    

    I cannot yet confirm the exact internal retry or polling mechanism, but the evidence now points much more strongly toward the Browser / Windows application-discovery path than toward the repository being analyzed.

    Relationship to the previous two incidents

    All three incidents now show a consistent pattern:

    Incident PowerShell startup events Additional evidence Associated Codex functionality
    2026-07-19, first incident 321 52 WMI out-of-memory warnings Codex process enumeration
    2026-07-19, second incident 777 5 active execution contexts Windows automation
    2026-08-04, third incident 523 467 unique PIDs, 137 warnings Browser / Windows app discovery

    The common factor across all three incidents is repeated PowerShell-based Windows process/application discovery under sustained Codex activity.

    The latest incident makes it less likely that the issue is specific to one repository or one terminal command.

    Hardware / OS evidence

    As with the previous incidents:

    • No new bugcheck dump was generated.
    • No new LiveKernelReport was generated.
    • No WHEA hardware errors were recorded.
    • No new display-driver recovery event was recorded.
    • No disk-related error indicating a storage failure was found.
    • The shutdown was recorded as an abnormal shutdown rather than a normal Windows bugcheck.

    This continues to provide no evidence of a GPU, SSD, RAM, or other hardware failure associated with the incident.

    Possible secondary observation

    ASUS GameFirst / GameTurbo.exe also changed the Windows power plan multiple times shortly before the freeze.

    However:

    • no corresponding GameTurbo error event was recorded;
    • the correlation is much weaker;
    • the PowerShell / Browser event storm is considerably more pronounced and directly precedes the freeze.

    I therefore currently consider GameTurbo a secondary observation rather than the primary cause.

    Current workaround

    Until this is fixed, I am avoiding:

    • Codex Browser control
    • Chrome/browser automation through Codex
    • Computer Use / desktop-control functionality
    • multiple concurrent Codex tasks or sub-agents

    For local web testing, I am instead using a single persistent terminal session with Playwright/browser CLI tools or manual browser inspection.

    I also fully exit Codex after stopping tasks to reduce the possibility of background contexts resuming application discovery.

    Current assessment

    After three independent hard-freeze incidents, the evidence now strongly suggests that the failure is associated with the Codex Windows App Browser / desktop-control application's Windows discovery layer repeatedly creating short-lived PowerShell processes.

    Under concurrent execution, polling, or error-retry conditions, the creation rate appears capable of becoming high enough to destabilize the entire Windows system.

    I can provide the decoded PowerShell script, exported PowerShell Operational logs, relevant Event Viewer data, and the per-PID timeline if maintainers would find them useful.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    appIssues related to the Codex desktop appbugSomething isn't workingperformancesubagentIssues involving subagents or multi-agent featurestool-callsIssues related to tool callingwindows-osIssues related to Codex on Windows systems

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions