codex - 💡(How to fix) Fix Windows desktop freezes while electron-sampler fails WMI process snapshots in sandbox

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…

Error Message

error={"code":-32600,"message":"goals feature is disabled"}

Root Cause

Codex Desktop should not freeze because a diagnostic/sampling command cannot access WMI process counters from the sandbox. If WMI access is unavailable, the sampler should either skip that data source, handle access denied cheaply, or avoid running the command from a sandbox token that lacks the required rights.

Code Example

OpenAI.Codex_26.506.3741.0_x64__2p2nqsd0c76g0

---

Microsoft Windows [Version 10.0.26200.8457]

---

warning [electron-sampler] Failed to collect child process snapshot
errorMessage="Command failed: powershell.exe -NoProfile -NonInteractive -Command
$ErrorActionPreference = 'Stop';
$cpuByPid = @{};
Get-CimInstance Win32_PerfFormattedData_PerfProc_Process |
  ForEach-Object { $cpuByPid[[int]$_.IDProcess] = [double]$_.PercentProcessorTime };
Get-CimInstance Win32_Process |
  Select-Object ProcessId,ParentProcessId,CommandLine,WorkingSetSize,
    @{Name='CpuPercent';Expression={$cpuByPid[[int]$_.ProcessId]}},
    @{Name='AgeSeconds';Expression={[int]((Get-Date) - $_.CreationDate).TotalSeconds}} |
  ConvertTo-Json -Depth 2
"

Get-CimInstance : Zugriff verweigert.

---

<HOST>\CodexSandboxOffline

---

method=thread/resume conversationId=<redacted> durationMs=58400 errorCode=null
method=thread/goal/get conversationId=<redacted> durationMs=58558 errorCode=-32600
error={"code":-32600,"message":"goals feature is disabled"}

method=thread/metadata/update conversationId=<redacted> durationMs=47839 errorCode=null
RAW_BUFFERClick to expand / collapse

What version of the Codex App are you using?

Codex Desktop 26.506.3741.0 from the Windows MSIX package path:

OpenAI.Codex_26.506.3741.0_x64__2p2nqsd0c76g0

What platform is your computer?

Microsoft Windows [Version 10.0.26200.8457]

What issue are you seeing?

Codex Desktop repeatedly freezes/stalls for a few seconds during normal UI interaction, including sending a message, streaming a response, moving the app window, and resuming/opening threads.

This still happens after reinstalling Codex Desktop and after disabling a previously active heartbeat automation. It also reproduces when no custom pet/avatar is active, so this does not appear to be a custom pet rendering/cache issue.

The app logs repeatedly show electron-sampler failing to collect a child process snapshot. The command it runs uses PowerShell/WMI, and it fails inside the Codex Windows sandbox with access denied.

Representative redacted log excerpt:

warning [electron-sampler] Failed to collect child process snapshot
errorMessage="Command failed: powershell.exe -NoProfile -NonInteractive -Command
$ErrorActionPreference = 'Stop';
$cpuByPid = @{};
Get-CimInstance Win32_PerfFormattedData_PerfProc_Process |
  ForEach-Object { $cpuByPid[[int]$_.IDProcess] = [double]$_.PercentProcessorTime };
Get-CimInstance Win32_Process |
  Select-Object ProcessId,ParentProcessId,CommandLine,WorkingSetSize,
    @{Name='CpuPercent';Expression={$cpuByPid[[int]$_.ProcessId]}},
    @{Name='AgeSeconds';Expression={[int]((Get-Date) - $_.CreationDate).TotalSeconds}} |
  ConvertTo-Json -Depth 2
"

Get-CimInstance : Zugriff verweigert.

Running the same WMI checks from a normal user PowerShell session succeeds. Running them from the Codex sandbox user fails. The sandbox command context reports the user as:

<HOST>\CodexSandboxOffline

The local Windows groups Leistungsüberwachungsbenutzer / Performance Monitor Users and Leistungsprotokollbenutzer / Performance Log Users were empty, which likely explains why CodexSandboxOffline cannot read those WMI classes.

Additional observations

The same sessions also show long thread/resume / metadata operations around the freezes, for example:

method=thread/resume conversationId=<redacted> durationMs=58400 errorCode=null
method=thread/goal/get conversationId=<redacted> durationMs=58558 errorCode=-32600
error={"code":-32600,"message":"goals feature is disabled"}

method=thread/metadata/update conversationId=<redacted> durationMs=47839 errorCode=null

That may be separate from the sampler issue, but both show up around the observed stalls.

Related: #21774 mentions later sampler warnings after a Windows desktop restart, but this issue is specifically about recurring UI freezes/stalls while electron-sampler repeatedly fails WMI process snapshots from the Windows sandbox context.

Steps to reproduce / local checks performed

  1. Start Codex Desktop on Windows with the default/elevated Windows sandbox configuration.
  2. Use the app normally: open/resume threads, send a message, move the window, wait for a streamed response.
  3. Observe repeated short UI freezes.
  4. Check Codex logs under %LOCALAPPDATA%\Codex\Logs.
  5. Observe repeated electron-sampler warnings with the WMI Get-CimInstance command above.
  6. Verify that the same WMI command succeeds outside Codex's sandbox but fails from the sandboxed CodexSandboxOffline context.

Expected behavior

Codex Desktop should not freeze because a diagnostic/sampling command cannot access WMI process counters from the sandbox. If WMI access is unavailable, the sampler should either skip that data source, handle access denied cheaply, or avoid running the command from a sandbox token that lacks the required rights.

Actual behavior

The app repeatedly attempts the WMI process snapshot from the sandboxed context, logs access-denied failures, and the desktop UI freezes/stalls intermittently.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

FAQ

Expected behavior

Codex Desktop should not freeze because a diagnostic/sampling command cannot access WMI process counters from the sandbox. If WMI access is unavailable, the sampler should either skip that data source, handle access denied cheaply, or avoid running the command from a sandbox token that lacks the required rights.

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING