Repository navigation
Description
Summary
Codex local command execution is completely blocked in the ChatGPT Windows desktop app.
Even a minimal command such as:
cmd.exe /d /c echo CODEX_OK
hangs indefinitely without returning stdout, stderr, or an exit status.
The same command works normally when executed directly from Windows CMD.
This is not related to a specific project, directory, drive, or conversation. The problem also occurs in a completely new Codex chat.
Environment
- OS: Windows 11 Pro
- Windows version: 25H2
- OS Build: 26200.9457
- ChatGPT Windows app: 26.930.3930.0
- Codex workspace version: 26.915.20218
- ChatGPT plan: Plus
Current Codex executable observed:
C:\Users\itamar\AppData\Local\OpenAI\Codex\bin\8aaf1547b825b104\codex.exe
Windows sandbox configuration currently restored to:
[windows]
sandbox = "unelevated"
Minimal reproduction
- Open ChatGPT for Windows.
- Open a new Codex chat.
- Ask Codex to execute only:
cmd.exe /d /c echo CODEX_OK
- The execution remains running indefinitely.
Expected result:
CODEX_OK
Actual result:
The execution hangs and the requested cmd.exe process is never spawned.
Important process-level diagnostic
While the Codex command was hanging, I inspected the Windows process tree using Get-CimInstance Win32_Process.
The main Codex process was running:
codex.exe ... app-server ...
Several processes were also present with:
codex.exe --__codex-windows-mxc
However, the requested process:
cmd.exe /d /c echo CODEX_OK
was NOT present in the Windows process list.
The cmd.exe processes that were present belonged only to internal Codex components, including:
cmd.exe /d /c scripts\launch_code_review_mcp.cmd
and:
cmd.exe /d /s /c call ./scripts/launch_codex_app_tools_mcp.cmd ./server.mjs
Therefore, the requested child process appears not to be spawned at all.
Troubleshooting already performed
- Confirmed CMD works normally outside Codex.
- Confirmed filesystem read/write works normally outside Codex.
- Reduced reproduction to
cmd.exe /d /c echo CODEX_OK, eliminating project/filesystem access as the cause. - Reproduced in a completely new Codex chat.
- Fully restarted ChatGPT.
- ChatGPT Settings > Codex Workspace > Diagnose reports that the Codex dependencies are in order.
- Used "Reset and install workspace" to download and reinstall the Codex workspace. The issue persisted.
- Tested Windows sandbox = "elevated". Issue persisted.
- Tested Windows sandbox = "unelevated". Issue persisted.
- Tested Windows sandbox = "mxc". Issue persisted.
- Tested alternate TEMP and TMP directory (
C:\CodexTemp). Issue persisted. - Restored TEMP/TMP afterward.
- Verified the normal Windows TEMP directory is readable and writable.
- Checked
winget upgrade; no ChatGPT update is currently offered. - Initially investigated project directory and filesystem ACLs, but those were ruled out because even a simple
echocommand hangs.
Additional observation
An older sandbox log under:
C:\Users\itamar.codex.sandbox\
stopped receiving new entries during the current reproduction attempts.
Earlier logs showed sandbox initialization activity, but the current failing executions did not update that log.
Feedback / diagnostics
A diagnostic feedback report was submitted directly from the affected Codex chat with ChatGPT diagnostic logs enabled.
Feedback ID:
01a103a6-9bd4-71b2-bf70-3c53ae3ea489
Impact
This completely blocks local Codex functionality in ChatGPT for Windows.
Codex cannot execute commands, inspect local projects through command execution, run tests, or perform source-code workflows that depend on local command execution.
Activity
Autarkis commentedon Oct 4, 2026
Observed a transient variant of this failure on Codex CLI 0.160.0 with Windows desktop app 26.930.3930.0 on 2026-10-04.
Measurements from read-only diagnostics:
Get-Content -LiteralPath <local markdown file>remained pending for over two minutes. Retrying withlogin: false/-NoProfilealso remained pending. The orchestration cells were cancelled, so the later sandbox log exit-code-1 records do not establish the original failure cause.cmd.exe /c echo CODEX_DISPATCH_PROBEalso stalled without accessing a file. The sandbox log recorded START at 13:04:18.989 and SUCCESS at 13:05:05.970: 46.981 seconds. The returned exec result reportedwall_time_seconds: 0.0000116, suggesting delay before the normal execution/output wait rather than time spent doing the command's work.nodeRepl.write('NODE_PING'), timed out at 10 seconds. The diagnostic loggedredacted_source_available=false.cmd.exe /c typetook 311 ms round trip; sandbox START-to-SUCCESS was 64 ms. PowerShell file reads subsequently returned normally.node:fs/promisestook 2 ms (474 ms total tool round trip).codex doctor --jsonafter recovery reported the desktop app-server handshake, installation consistency, and sandbox configuration as OK. No relevant Codex process-launch error appeared in the inspected Windows Application/System/Code Integrity/Defender error records during the incident.This isolates the observed symptom to the sandbox execution/startup path rather than the markdown file or a PowerShell profile. It does not identify the exact internal wait, establish the same root cause as this issue, or demonstrate a permanent fix. I cannot currently reproduce it after recovery.
Related shell + node_repl timeout report: #48755
isolopak2 commentedon Oct 5, 2026
Update — 2026-10-05
The issue has now spontaneously recovered without any additional reinstall, service restart, or configuration change.
I can confirm that:
However, execution still appears unusually slow. The simple echo CODEX_OK interaction took approximately 22 seconds, and listing the local Obsidian directory took approximately 20 seconds.
This recovery appears consistent with the transient behavior described in the diagnostic response above. No specific action can currently be identified as the fix.
I will leave the issue open because the root cause has not been identified and the current command startup latency still appears abnormal.
arektet commentedon Oct 6, 2026
I can reproduce this issue on Windows 11.
Environment:
codex doctor --jsondetected desktop version: 26.930.7945.0Desktop reproduction:
cmd.exe /d /c echo OK
exec_commandremains running indefinitely.The same problem occurs with PowerShell and with local file reads.
Important isolation result:
Running the bundled CLI directly outside the Desktop conversation works:
codex.exe --version
Result:
codex-cli 0.160.1
codex.exe sandbox -- cmd.exe /d /c echo CODEX_SANDBOX_OK
Result:
CODEX_SANDBOX_OK
codex doctor --jsonreports:The Desktop logs show that codex.exe and the app-server transport are spawned,
but there is no corresponding exec_command/sandbox log entry when the command
from the conversation hangs.
Troubleshooting already performed:
Conclusion:
The Windows sandbox itself works. The failure appears to be in the Desktop
conversation → unified exec/app-server command bridge or result handoff path.
This completely blocks local file inspection, editing, Git operations and tests.
hhdias commentedon Oct 6, 2026
I can reproduce this on a separate Windows 11 system, with one additional A/B result that may help isolate the failure.
Environment observed before updating:
The issue persisted after updating the desktop app/CLI and after creating fresh Codex/Luna threads.
Reproduction matrix:
Write-Outputcan return, but child processes such ascmd.exe,git.exe, andpython.exestill time outWrite-Output,cmd,git, andpythonall time outFull-access control results in the same fresh thread environment:
cmd /d /c "echo CHILD_PROCESS_OK"-> PASS, exit 0, 1.102 sgit --version-> PASS,git version 2.56.0.windows.2, exit 0, 0.300 spython --version-> PASS,Python 3.14.7, exit 0, 0.272 sAdditional troubleshooting:
pwsh.exeworks normally outside the task runner (~0.3 s)codex-primary-runtimeCodexSandboxService.OpenAI.Codexsuccessfully (new PID)codex doctorreports sandbox backend = elevated and sandbox provisioning = completeThe strongest discriminator here is that the exact same child commands succeed immediately under Full access while both Windows sandbox implementations fail. This looks consistent with a failure in the native Windows sandbox child-process launch path rather than Git/Python/PowerShell themselves.
hhdias commentedon Oct 6, 2026
Post-update follow-up to my earlier report (comment #6027142910):
26.1002.51308(About dialog: “Powered by Codex & OWL”, released October 6, 2026).workspace-writemode, not Full access.Write-Output "SHELL_OK"— 10.000 scmd /d /c "echo CHILD_OK"— 10.011 sgit --version— 10.010 spython --version— 10.010 sResult:
SANDBOX_STILL_BROKENon ChatGPT desktop26.1002.51308. The update did not resolve the sandboxed command-execution failure. The previously verified Full-access PASS was obtained before this update; Full access was not re-tested for this specific desktop build.arektet commentedon Oct 7, 2026
arektet commentedon Oct 7, 2026
hhdias commentedon Oct 12, 2026
Update — October 12, 2026 (follow-up to my earlier comments #6027142910 and #6027742224).
The issue still reproduces after a full reinstall of the ChatGPT Windows desktop application, a Windows reboot, and reinstalling Codex Workspace Dependencies. The app's dependency diagnostics report healthy, but local command execution remains blocked in restricted Desktop modes.
New controlled A/B tests
cmd.exe /d /c echo WINDOWS_CMD_OK: PASS.cmd.exe /d /c echo CODEX_FULL_ACCESS_OKcall returned exit code 0 in 0.786 s.[windows] sandbox = "unelevated": still fails. Earlierelevatedtesting also failed.Important new discriminator: invoke the sandbox directly via the bundled CLI
From an ordinary PowerShell session (outside Codex Desktop), using the executable installed at
%LOCALAPPDATA%\OpenAI\Codex\bin\2e5e00daee91c61d\codex.exe:Direct CLI sandbox invocation succeeds while sandboxed command execution initiated from a Desktop conversation hangs. This is consistent with the Desktop conversation → command execution/app-server handoff being implicated (or a different sandbox invocation path), rather than CMD itself or a total inability to launch processes under the Windows sandbox. It does not prove the exact internal root cause.
Local diagnostic log evidence
~/.codex/logs_2.sqlitedatabase contains recentexectool events withoutcome="interrupted"; one call took approximately 10.2 seconds before interruption. These are interruption durations, not natural exit codes of the requested commands.26.1007.21434; this is a client version observed in the logs, not a claimed Windows application About-dialog version.~/.codex/.sandbox/sandbox.logpath is absent on this installation.This aligns with the independent Desktop-vs-direct-CLI reproduction in comment #6011061867. The issue remains reproducible after reinstalling, in both restricted approval modes, while Full access and direct CLI sandbox execution succeed.
HABU-daiki-matsushita commentedon Oct 13, 2026
Same issue here on a newer version.
(the update had failed twice on 10-12 with 0x80073D02 because the app was running)
START: windows -- cmd.exe /d /c echo SANDBOX_OK
robincornelius commentedon Oct 14, 2026
I can reproduce this on another Windows 11 system on 14 October 2026. The desktop-versus-direct-CLI distinction described above matches my results closely.
Environment:
codex doctorreports desktop package version 26.1007.9446.0; these are different version representations.sandbox_mode = "workspace-write",[windows] sandbox = "unelevated".Reproduction:
exec_commandwithWrite-Output 'DESKTOP_SANDBOX_PROBE'or CMDecho DESKTOP_CMD_OKreturns a running session ID after approximately 10 seconds, with no output. Subsequent polls still return no output.login=falseand a working directory outside OneDrive (C:\Windows) do not resolve it.node_replreadiness checks and browser automation also time out.Important positive control:
Using the same installed CLI directly from PowerShell:
This returns
DIRECT_UNELEVATED_OK, exit 0 (recorded repeat: 1.75 seconds). Direct sandboxed PowerShell successfully reads a project file, and the bundled Node runtime successfully runsconsole.log(12345)inside the direct sandbox.Caveat: the desktop uses a restricted permission profile while the direct probe uses
:workspace; identical effective permissions have not been established.Already attempted: repeated full app/subprocess restarts, full PC reboot, disabling OneDrive, closing PowerPoint, and changing elevated to unelevated followed by restart. The updater reports no update available. These have not restored normal desktop execution.
Diagnostics:
codex doctorreports configuration parsing, installation consistency, desktop app-server handshake, provider HTTP/WebSocket connectivity and sandbox configuration as OK.windowsSandbox/readinessresponses.C:\Users\Default, but those should not be assumed to explain the current failure because direct unelevated execution now works.This supports investigating the desktop command-execution handoff or a different sandbox invocation path. It does not establish the precise internal cause. A supported recovery path and actionable timeout diagnostics would be appreciated; repeated failed attempts have blocked work and consumed Pro usage.
I have prepared a sanitised diagnostics bundle containing selected log excerpts and diagnostic summaries, excluding credentials, sandbox secrets, full configuration and project documents.
codex-sandbox-bug-report.zip
danmaster023 commentedon Nov 1, 2026
Codex desktop (Windows): remote exec-server command hangs in the MXC runner before any shell starts; user config can't change the backend
Additional reproduction report from November 1, 2026. Credentials, tokens, account IDs and environment IDs are omitted.
Versions
MXC availability: trueandWindows sandbox selection: mxc(for example 2026-11-01 00:06:54 and 00:12:40 local)What happens
Write-Output '<marker>'.codex.exe ... exec-server --remote https://codex-cloud-environments.chatgpt.com/api --environment-id <redacted>) starts an MXC runner (codex.exe --__codex-windows-mxc) at 2026-11-01 04:48:05 local.~/.codex/.sandbox/sandbox.<date>.log. The remote side's first response and one follow-up read both reported "still running" with no output.Why user configuration couldn't change it
-c features.prefer_mxc=trueon the command line. That overrides~/.codex/config.toml.[features] prefer_mxc = falsein config.toml (keeping[windows] sandbox = "elevated") and ran one marker. It still went to MXC and stalled the same way. The config was then restored, and its hash verified, unchanged since.electron-prefer-mxc-enabledis true. On this machine that setting is true. It appears to be set from a renderer feature gate rather than a visible setting.[windows] allow_mxc = false, described in the docs as a managedrequirements.tomlrequirement. It was added in CLI 0.163.0 (openai/codex PR 51547). The bundled 0.166 CLI recognises the key. It isn't set on this machine and hasn't been tested. Whether the remote bridge honours it is unknown.Related reports
codex.exe --__codex-windows-mxcprocesses are present, the requested child process is never spawned, and the sandbox log stops receiving entries. The same commands succeed when run directly through the bundled CLI'scodex sandbox. The issue's attachments weren't opened for this report.cua_noderuntime'snode_repl.exe(runtime 3dd31cfff853001c). That error-32 fix (PR 51822, "Avoid sharing violations when repairing Windows runtime ACLs") shipped in CLI 0.163.0. This machine now runs 0.166.0-alpha.5.1 and a newer runtime (5c41f77a7900391c). The current MXC hang showed no setup or validation activity at all.Not yet tested
Expected
windows.sandboxbackend, instead of hanging silently with no log entry.features.prefer_mxc,windows.sandbox) apply to it.Diagnostics available on request
Process tree (bridge → MXC runner → conhost, no shell), timestamps, and sandbox log excerpts. All of it can be shared with ids redacted.
fix: make Codex ready only after a real sandboxed command passes (ADR…