Repository navigation
Description
What version of the Codex App are you using (From “About Codex” dialog)?
Operating system: Windows 11 Pro, x64 - Codex CLI: 0.161.0 - Installation: npm global package @openai/[email protected] - Shell: Windows PowerShell - Terminal: Windows Terminal - Installation location: %APPDATA%\npm\node_modules\@openai\codex - Runtime location: %LOCALAPPDATA%\OpenAI\Codex\runtimes\cua_node\3dd31cfff853001c\bin - Working directory: C:\Users\scott\Documents\YouTube-Automation
What subscription do you have?
plus
What platform is your computer?
Operating system: Windows 11 Pro, x64
What issue are you seeing?
Bug: Windows sandbox initialization fails with error 32 on node_repl.exe — Codex CLI 0.161.0
Description
Codex CLI v0.161.0 on Windows 11 consistently fails to execute local PowerShell commands when Windows sandboxing is enabled.
The execution helper fails before the requested command can start, reporting:
Failed to create unified exec process:
helper_unknown_error: setup refresh had errors
The sandbox logs identify the underlying failure as a Windows file-sharing violation (OS error 32) when the sandbox setup process attempts to update access permissions on node_repl.exe.
Important: The same PowerShell commands execute successfully when Codex is launched in full-access mode without sandbox restrictions.
This suggests a problem specifically in Windows sandbox initialization rather than PowerShell or the project environment.
Environment
- Operating system: Windows 11 Pro, x64
- Codex CLI: 0.161.0
- Installation: npm global package
@openai/[email protected] - Shell: Windows PowerShell
- Terminal: Windows Terminal
- Installation location:
%APPDATA%\npm\node_modules\@openai\codex - Runtime location:
%LOCALAPPDATA%\OpenAI\Codex\runtimes\cua_node\3dd31cfff853001c\bin - Working directory:
C:\Users\scott\Documents\YouTube-Automation
Steps to reproduce
- Open Windows PowerShell.
- Navigate to the project directory.
- Start Codex using the normal Windows sandbox:
codex --sandbox workspace-write --ask-for-approval on-request --no-daemon
- Ask Codex to execute the following PowerShell command:
Get-Location
- Observe that the command fails before PowerShell launches.
The failure is reproducible across multiple attempts and after Windows restarts.
Actual behavior
Failed (exit -1) Get-Location
Failed to create unified exec process:
helper_unknown_error: setup refresh had errors
Relevant sandbox log:
runtime read/execute validation failed:
validate runtime read/execute access on
C:\Users\scott\AppData\Local\OpenAI\Codex\runtimes\cua_node\3dd31cfff853001c\bin\node_repl.exe:
open ACL target for root-only update:
The process cannot access the file because it is being used by another process.
(os error 32)
Followed by:
setup refresh completed with errors
setup error: setup refresh had errors
Expected behavior
Codex should initialize its Windows sandbox successfully and execute authorized PowerShell commands under the selected sandbox policy.
A read-only command such as Get-Location should not fail during sandbox setup.
Successful comparison test
Launching Codex with:
codex --sandbox danger-full-access --ask-for-approval on-request --no-daemon
allows the same command to execute successfully:
Path
----
C:\Users\scott\Documents\YouTube-Automation
This was performed solely as a diagnostic test. Full-access mode is not an acceptable permanent workaround.
Troubleshooting already performed
- Restarted Windows multiple times.
- Closed all Codex sessions and confirmed Codex-related processes had terminated.
- Verified that
node_repl.exeexists and has a valid OpenAI Authenticode signature. - Verified that
codex-windows-sandbox-setup.exeexists and has a valid digital signature. - Checked the runtime executable's Windows ACL.
- Confirmed the current user, SYSTEM, and Administrators have Full Control.
- Confirmed
CodexSandboxUsershas Read & Execute access. - Used Microsoft Sysinternals Process Monitor and Process Explorer to investigate runtime file access.
- Tested different Codex feature flags and
--no-daemon. - Reinstalled the current Codex version through
codex update. - Confirmed that both
codex --versionand npm report 0.161.0. - Confirmed that PowerShell works normally outside Codex.
None of these actions resolved sandboxed execution.
Additional observations
codex doctor --summary reports:
✗ sandbox elevated Windows sandbox provisioning recorded a structured failure
⚠ app-server background server socket is stale or unreachable
⚠ mcp MCP configuration has optional issues
The diagnostic report indicates that installation, authentication, runtime discovery, connectivity, and session databases are otherwise healthy.
During troubleshooting, Codex spawned multiple node_repl.exe processes. The sandbox setup repeatedly encountered OS error 32 when attempting to update permissions on the same runtime executable.
Process Monitor also recorded file access involving node_repl.exe, including a FILE LOCKED WITH ONLY READERS result. The precise process or operation responsible for the conflicting file handle has not been conclusively identified.
Possible area to investigate
There may be a race condition or file-sharing conflict between the Codex runtime initialization process and Windows sandbox ACL provisioning.
In particular, the sandbox setup may attempt to update the executable's security descriptor after another runtime process has opened the executable with sharing restrictions that prevent the requested operation.
This is a hypothesis, not a confirmed root cause.
Request
Please investigate why Windows sandbox initialization attempts to update access permissions on node_repl.exe while the file is locked, causing the entire command execution helper to fail.
Is there a supported repair or workaround that restores protected execution without disabling the Windows sandbox or changing Windows security protections?
Diagnostic logs and a redacted codex doctor --json report can be supplied if needed.
What steps can reproduce the bug?
- Open Windows PowerShell.
- Navigate to the project directory.
- Start Codex using the normal Windows sandbox:
codex --sandbox workspace-write --ask-for-approval on-request --no-daemon
- Ask Codex to execute the following PowerShell command:
Get-Location
- Observe that the command fails before PowerShell launches.
The failure is reproducible across multiple attempts and after Windows restarts.
What is the expected behavior?
Codex should initialize its Windows sandbox successfully and execute authorized PowerShell commands under the selected sandbox policy.
A read-only command such as Get-Location should not fail during sandbox setup.
Successful comparison test
Launching Codex with:
codex --sandbox danger-full-access --ask-for-approval on-request --no-daemon
allows the same command to execute successfully:
Path
----
C:\Users\scott\Documents\YouTube-Automation
This was performed solely as a diagnostic test. Full-access mode is not an acceptable permanent workaround.
Additional information
Troubleshooting already performed
- Restarted Windows multiple times.
- Closed all Codex sessions and confirmed Codex-related processes had terminated.
- Verified that
node_repl.exeexists and has a valid OpenAI Authenticode signature. - Verified that
codex-windows-sandbox-setup.exeexists and has a valid digital signature. - Checked the runtime executable's Windows ACL.
- Confirmed the current user, SYSTEM, and Administrators have Full Control.
- Confirmed
CodexSandboxUsershas Read & Execute access. - Used Microsoft Sysinternals Process Monitor and Process Explorer to investigate runtime file access.
- Tested different Codex feature flags and
--no-daemon. - Reinstalled the current Codex version through
codex update. - Confirmed that both
codex --versionand npm report 0.161.0. - Confirmed that PowerShell works normally outside Codex.
None of these actions resolved sandboxed execution.
Additional observations
codex doctor --summary reports:
✗ sandbox elevated Windows sandbox provisioning recorded a structured failure
⚠ app-server background server socket is stale or unreachable
⚠ mcp MCP configuration has optional issues
The diagnostic report indicates that installation, authentication, runtime discovery, connectivity, and session databases are otherwise healthy.
During troubleshooting, Codex spawned multiple node_repl.exe processes. The sandbox setup repeatedly encountered OS error 32 when attempting to update permissions on the same runtime executable.
Process Monitor also recorded file access involving node_repl.exe, including a FILE LOCKED WITH ONLY READERS result. The precise process or operation responsible for the conflicting file handle has not been conclusively identified.
Possible area to investigate
There may be a race condition or file-sharing conflict between the Codex runtime initialization process and Windows sandbox ACL provisioning.
In particular, the sandbox setup may attempt to update the executable's security descriptor after another runtime process has opened the executable with sharing restrictions that prevent the requested operation.
This is a hypothesis, not a confirmed root cause.
Request
Please investigate why Windows sandbox initialization attempts to update access permissions on node_repl.exe while the file is locked, causing the entire command execution helper to fail.
Is there a supported repair or workaround that restores protected execution without disabling the Windows sandbox or changing Windows security protections?
Diagnostic logs and a redacted codex doctor --json report can be supplied if needed.
Activity
github-actions commentedon Oct 8, 2026
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action
laffo16 commentedon Oct 8, 2026
I can reproduce this with Codex CLI 0.161.0 installed through npm on Windows, with daemon mode disabled. I declined the startup prompt to enable the daemon.
My environment is native Windows 10, PowerShell 7 and Windows Terminal, with the Windows sandbox enabled.
I tested the following sequence:
apply_patchand shell execution failed, including after restarting Codex.The patch test created a small temporary file inside the permitted workspace. On 0.160.1, the file was successfully created, its contents verified, then deleted using
apply_patch, with deletion verified afterwards. On 0.161.0, the test file was never created.The patch UI displayed:
The tool returned:
Shell execution failed before the requested command started:
The sandbox log recorded the same underlying failure reported here:
The target folder already granted
CodexSandboxUsersModify permission. I did not change folder permissions or disable the sandbox for these comparisons.I also encountered this message during the update / restart cycle, despite having confirmed that no other session was open:
That warning did not clear promptly; it took several restarts before I could resume the conversation. I have not established whether this stale conversation-lock message shares the same cause as the sandbox failure.
I am currently back on 0.160.1, where the patch and shell tests pass. Could maintainers confirm which stable CLI release will include the fix from #51822?
laffo16 commentedon Oct 9, 2026
Follow-up from 9 October: I encountered the same sandbox failure again while my npm-installed CLI and
codex --versionboth reported 0.160.1.When starting 0.160.1 this morning, I chose to start without the daemon when prompted. This was the first time I had seen that daemon-enablement prompt on 0.160.1; previously I had only seen it on 0.161.0, which added to the confusion.
On inspecting the logs, the failed commands were actually being executed through a managed 0.162.0 daemon. Its sandbox setup failed on
node_repl.exewith:The daemon updater also recorded a scheduled selection of
0.162.0-x86_64-pc-windows-msvc. The terminal client remained 0.160.1.After restarting Codex, the execution paths switched to the npm-installed 0.160.1 helpers, and shell execution plus
apply_patchworked again. Since both the process state and execution path changed, this wasn't a controlled restart-only comparison.This adds a diagnostic complication: the installed CLI version alone may not identify the version responsible for the failure. Could diagnostics make the executing daemon version more visible, and could maintainers clarify why an existing managed daemon was used after I chose to start without the daemon? I haven't established how that startup choice led to the execution path recorded in the logs.
This is consistent with the issue addressed by #51822. I haven't tested a build containing that fix yet.
Scotthart58 commentedon Oct 10, 2026
Mr-Natural commentedon Oct 10, 2026
Also reproducing on Codex CLI and app-server-daemon 0.162.1,
Windows 11 build 26200 x64, using Windows Terminal.
Reproduction:
helper_unknown_error: setup refresh had errors
The sandbox log identifies error 32 while opening node_repl.exe
for an ACL operation. Restart Manager identified two processes
in the current Codex tree using that executable. The failure
persisted after restarting the identified daemons/helpers.
Feedback logs:
01a0fb1a-0faa-7492-b8ce-8859b0e9b95e
The exact conflicting access/share flags remain unverified.
Sanitized codex doctor output follows.
PS C:\Users\user> codex doctor --json
{
"schemaVersion": 1,
"generatedAt": "1791627985s since unix epoch",
"overallStatus": "fail",
"codexVersion": "0.162.1",
"checks": {
"app_server.status": {
"id": "app_server.status",
"category": "app-server",
"status": "ok",
"summary": "background server is running",
"details": {
"app-server version": "0.162.1",
"control socket": "C:\Users\user\.codex\app-server-control\app-server-control.sock",
"daemon state dir": "C:\Users\user\.codex\app-server-daemon",
"dedicated pid file": "C:\Users\user\.codex\app-server-daemon\daemon.pid (file)",
"dedicated update-loop pid file": "C:\Users\user\.codex\app-server-daemon\daemon-updater.pid (file)",
"mode": "ephemeral",
"pid file": "C:\Users\user\.codex\app-server-daemon\app-server.pid (missing)",
"settings": "C:\Users\user\.codex\app-server-daemon\settings.json (missing)",
"status": "running",
"update-loop pid file": "C:\Users\user\.codex\app-server-daemon\app-server-updater.pid (missing)"
},
"remediation": null,
"durationMs": 13
},
"auth.credentials": {
"id": "auth.credentials",
"category": "auth",
"status": "ok",
"summary": "auth is configured",
"details": {
"auth env vars present": "OPENAI_API_KEY",
"auth file": "C:\Users\user\.codex\auth.json",
"auth storage mode": "File",
"stored API key": "false",
"stored ChatGPT tokens": "true",
"stored agent identity": "false",
"stored auth mode": "chatgpt"
},
"remediation": null,
"durationMs": 0
},
"config.load": {
"id": "config.load",
"category": "config",
"status": "ok",
"summary": "config loaded",
"details": {
"CODEX_HOME": "C:\Users\user\.codex",
"active thread overrides": "not inspected",
"config.toml": "C:\Users\user\.codex\config.toml",
"config.toml parse": "ok",
"configuration load ms": "5",
"configuration scope": "invocation config, including cloud-managed policy",
"configured TUI mode": "fullscreen",
"cwd": "C:\Users\user",
"enabled feature flags": "",
"feature flag overrides": "none",
"feature flags enabled": "58",
"log dir": "C:\Users\user\.codex\log",
"mcp servers": "1",
"model": "gpt-6-astra",
"model provider": "openai",
"sqlite home": "C:\Users\user\.codex"
},
"remediation": null,
"durationMs": 0
},
"desktop.app.version": {
"id": "desktop.app.version",
"category": "desktop",
"status": "ok",
"summary": "the desktop application is installed",
"details": {
"log directory": "$HOME\AppData\Local\Codex/Logs",
"running": "false",
"version": "26.1007.2314.0"
},
"remediation": null,
"durationMs": 0
},
"desktop.app_server.handshake": {
"id": "desktop.app_server.handshake",
"category": "desktop",
"status": "ok",
"summary": "the desktop application is not running",
"details": {},
"remediation": null,
"durationMs": 0
},
"desktop.security.enforcement": {
"id": "desktop.security.enforcement",
"category": "desktop",
"status": "ok",
"summary": "no locally visible recent Codex security enforcement was found",
"details": {},
"remediation": null,
"durationMs": 0
},
"git.environment": {
"id": "git.environment",
"category": "git",
"status": "ok",
"summary": "git executable found; execution not verified",
"details": {
"PATH git #1": "C:\Program Files\Git\cmd\git.exe",
"PATH git entries": "1",
"git execution": "not inspected (PATH helpers are not executed)",
"repo detected": "false",
"selected git": "C:\Program Files\Git\cmd\git.exe"
},
"remediation": null,
"durationMs": 23
},
"git.worktree.dev_drive": {
"id": "git.worktree.dev_drive",
"category": "git",
"status": "ok",
"summary": "no Git worktree is active",
"details": {},
"remediation": null,
"durationMs": 0
},
"installation": {
"id": "installation",
"category": "install",
"status": "ok",
"summary": "installation looks consistent",
"details": {
"PATH codex #1": "C:\Users\user\AppData\Roaming\npm\codex.cmd",
"current executable": "C:\Users\user\AppData\Roaming\npm\node_modules\@openai\codex\node_modules\@openai\codex-win32-x64\vendor\x86_64-pc-windows-msvc\bin\codex.exe",
"install context": "npm (package C:\Users\user\AppData\Roaming\npm\node_modules\@openai\codex\node_modules\@openai\codex-win32-x64\vendor\x86_64-pc-windows-msvc, bin C:\Users\user\AppData\Roaming\npm\node_modules\@openai\codex\node_modules\@openai\codex-win32-x64\vendor\x86_64-pc-windows-msvc\bin, resources C:\Users\user\AppData\Roaming\npm\node_modules\@openai\codex\node_modules\@openai\codex-win32-x64\vendor\x86_64-pc-windows-msvc\codex-resources, path C:\Users\user\AppData\Roaming\npm\node_modules\@openai\codex\node_modules\@openai\codex-win32-x64\vendor\x86_64-pc-windows-msvc\codex-path)",
"managed by Vite+": "false",
"managed by bun": "false",
"managed by npm": "true",
"managed by pnpm": "false",
"managed package root": "C:\Users\user\AppData\Roaming\npm\node_modules\@openai\codex",
"npm update target": "not inspected (PATH helpers are not executed)"
},
"remediation": null,
"durationMs": 21
},
"mcp.config": {
"id": "mcp.config",
"category": "mcp",
"status": "warning",
"summary": "MCP configuration has optional issues",
"details": {
"configured servers": "1",
"disabled servers": "0",
"node_repl": "env var CODEX_WINDOWS_REGISTERED_CORE is not set",
"stdio servers": "1"
},
"remediation": "Set the missing MCP env vars or disable the affected server.",
"durationMs": 0
},
"network.env": {
"id": "network.env",
"category": "network",
"status": "ok",
"summary": "network-related environment looks readable",
"details": {
"managed proxy": "not configured",
"proxy env vars": "none",
"respect system proxy": "disabled"
},
"remediation": null,
"durationMs": 0
},
"network.provider_reachability": {
"id": "network.provider_reachability",
"category": "reachability",
"status": "ok",
"summary": "active provider endpoints are reachable over HTTP",
"details": {
"ChatGPT inference URL": "https://chatgpt.com/backend-api/ reachable (HTTP 405)",
"desktop assets CDN": "https://persistent.oaistatic.com/codex-app-prod/ reachable (HTTP 200)",
"reachability mode": "ChatGPT auth"
},
"remediation": null,
"durationMs": 183
},
"network.websocket_reachability": {
"id": "network.websocket_reachability",
"category": "websocket",
"status": "ok",
"summary": "Responses WebSocket handshake succeeded",
"details": {
"DNS": "2 IPv4, 2 IPv6, first IPv6",
"auth mode": "chatgpt",
"connect timeout": "15000 ms",
"endpoint": "wss://chatgpt.com/backend-api/",
"handshake result": "HTTP 101 Switching Protocols",
"model provider": "openai",
"provider name": "OpenAI",
"proxy env vars": "none",
"reasoning header": "false",
"server model present": "false",
"supports websockets": "true",
"wire API": "responses"
},
"remediation": null,
"durationMs": 729
},
"runtime.provenance": {
"id": "runtime.provenance",
"category": "runtime",
"status": "ok",
"summary": "running npm on windows-x86_64",
"details": {
"commit": "unknown",
"current executable": "C:\Users\user\AppData\Roaming\npm\node_modules\@openai\codex\node_modules\@openai\codex-win32-x64\vendor\x86_64-pc-windows-msvc\bin\codex.exe",
"install method": "npm (package C:\Users\user\AppData\Roaming\npm\node_modules\@openai\codex\node_modules\@openai\codex-win32-x64\vendor\x86_64-pc-windows-msvc, bin C:\Users\user\AppData\Roaming\npm\node_modules\@openai\codex\node_modules\@openai\codex-win32-x64\vendor\x86_64-pc-windows-msvc\bin, resources C:\Users\user\AppData\Roaming\npm\node_modules\@openai\codex\node_modules\@openai\codex-win32-x64\vendor\x86_64-pc-windows-msvc\codex-resources, path C:\Users\user\AppData\Roaming\npm\node_modules\@openai\codex\node_modules\@openai\codex-win32-x64\vendor\x86_64-pc-windows-msvc\codex-path)",
"platform": "windows-x86_64",
"version": "0.162.1"
},
"remediation": null,
"durationMs": 0
},
"runtime.search": {
"id": "runtime.search",
"category": "search",
"status": "ok",
"summary": "search command found (bundled); execution not verified",
"details": {
"search command": "C:\Users\user\AppData\Roaming\npm\node_modules\@openai\codex\node_modules\@openai\codex-win32-x64\vendor\x86_64-pc-windows-msvc\codex-path\rg.exe",
"search command readiness": "file exists",
"search provider": "bundled"
},
"remediation": null,
"durationMs": 0
},
"sandbox.filesystem_paths": {
"id": "sandbox.filesystem_paths",
"category": "sandbox",
"status": "ok",
"summary": "no explicit filesystem paths to probe",
"details": {},
"remediation": null,
"durationMs": 0
},
"sandbox.helpers": {
"id": "sandbox.helpers",
"category": "sandbox",
"status": "fail",
"summary": "elevated Windows sandbox provisioning recorded a structured failure",
"details": {
"approval policy": "OnRequest",
"codex-linux-sandbox helper": "none",
"denied-read glob rules": "0",
"denied-read restrictions": "false",
"denied-read rules": "0",
"error code": "helper_unknown_error",
"execve wrapper helper": "none",
"filesystem sandbox": "restricted",
"glob scan max depth": "unbounded",
"managed filesystem source": "none",
"network sandbox": "restricted",
"sandbox backend": "elevated",
"sandbox provisioning": "failed"
},
"issues": [
{
"severity": "fail",
"cause": "elevated Windows sandbox provisioning recorded a structured failure",
"measured": "helper_unknown_error",
"expected": null,
"remedy": "repair or reinstall the Codex CLI from an approved distribution",
"fields": [
"error code"
]
}
],
"remediation": "repair or reinstall the Codex CLI from an approved distribution",
"durationMs": 0
},
"security.endpoint": {
"id": "security.endpoint",
"category": "security",
"status": "ok",
"summary": "no supported endpoint protection detected",
"details": {
"endpoint products": "none detected"
},
"remediation": null,
"durationMs": 40
},
"state.paths": {
"id": "state.paths",
"category": "state",
"status": "ok",
"summary": "state paths and databases are inspectable",
"details": {
"CODEX_HOME": "C:\Users\user\.codex (dir)",
"active rollout files": "26 files, 185898513 total bytes, 7149942 average bytes",
"archived rollout files": "0 files, 0 total bytes, 0 average bytes",
"goals DB": "C:\Users\user\.codex\goals_1.sqlite (file)",
"goals DB integrity": "ok",
"log DB": "C:\Users\user\.codex\logs_2.sqlite (file)",
"log DB integrity": "ok",
"log dir": "C:\Users\user\.codex\log (dir)",
"memories DB": "C:\Users\user\.codex\memories_1.sqlite (file)",
"memories DB integrity": "ok",
"memories v2 DB": "C:\Users\user\.codex\memories_v2_1.sqlite (missing)",
"memories v2 DB integrity": "skipped (missing)",
"queue DB": "C:\Users\user\.codex\queue_1.sqlite (file)",
"queue DB integrity": "ok",
"sqlite home": "C:\Users\user\.codex (dir)",
"state DB": "C:\Users\user\.codex\state_5.sqlite (file)",
"state DB integrity": "ok",
"thread history DB": "C:\Users\user\.codex\thread_history_1.sqlite (file)",
"thread history DB integrity": "ok"
},
"remediation": null,
"durationMs": 263
},
"state.rollout_db_parity": {
"id": "state.rollout_db_parity",
"category": "threads",
"status": "ok",
"summary": "rollout files and state DB thread inventory agree",
"details": {
"default model provider": "openai",
"rollout DB active files": "26",
"rollout DB active rows": "26",
"rollout DB archive mismatches": "0",
"rollout DB archived files": "0",
"rollout DB archived rows": "0",
"rollout DB duplicate DB paths": "0",
"rollout DB duplicate rollout thread ids": "0",
"rollout DB malformed file names": "0",
"rollout DB missing active rows": "0",
"rollout DB missing archived rows": "0",
"rollout DB model providers": "openai=26",
"rollout DB rows": "26",
"rollout DB scan cap reached": "false",
"rollout DB scan errors": "0",
"rollout DB sources": "cli=19, vscode=7",
"rollout DB stale rows": "0"
},
"remediation": null,
"durationMs": 74
},
"system.disk": {
"id": "system.disk",
"category": "disk",
"status": "ok",
"summary": "sufficient free disk space (52.0 GiB)",
"details": {
"CODEX_HOME available": "52.0 GiB",
"failure threshold": "1.0 GiB",
"warning threshold": "5.0 GiB",
"worktree available": "52.0 GiB"
},
"remediation": null,
"durationMs": 0
},
"system.environment": {
"id": "system.environment",
"category": "system",
"status": "ok",
"summary": "OS language en-US",
"details": {
"EDITOR": "not set",
"VISUAL": "not set",
"os": "Windows 10.0.26200 (Windows 11 Core) [64-bit]",
"os language": "en-US",
"os type": "Windows",
"os version": "10.0.26200"
},
"remediation": null,
"durationMs": 0
},
"terminal.env": {
"id": "terminal.env",
"category": "terminal",
"status": "ok",
"summary": "terminal metadata was detected",
"details": {
"WT_SESSION": "present",
"color output": "enabled",
"console input code page": "437",
"console output code page": "437",
"stderr console mode": "0x00000007 (VT processing: true)",
"stderr is terminal": "true",
"stdin is terminal": "true",
"stdout console mode": "0x00000007 (VT processing: true)",
"stdout is terminal": "true",
"terminal": "Windows Terminal",
"terminal size": "138x108"
},
"remediation": null,
"durationMs": 0
},
"terminal.title": {
"id": "terminal.title",
"category": "title",
"status": "ok",
"summary": "terminal title default",
"details": {
"terminal title activity": "true",
"terminal title items": "activity, project-name",
"terminal title project source": "cwd",
"terminal title project value": "user",
"terminal title source": "default"
},
"remediation": null,
"durationMs": 0
},
"updates.status": {
"id": "updates.status",
"category": "updates",
"status": "ok",
"summary": "update configuration is locally consistent",
"details": {
"cached latest version": "0.162.1",
"check for update on startup": "true",
"last checked at": "2026-10-10T08:33:32.381387600Z",
"latest version": "0.162.1",
"latest version status": "current version is not older",
"npm update target": "not inspected (PATH helpers are not executed)",
"update action": "npm install -g @openai/codex",
"version cache": "C:\Users\user\.codex\version.json"
},
"remediation": null,
"durationMs": 359
}
}
}
PS C:\Users\user>
e740554 commentedon Oct 14, 2026
Same failure with the npm CLI on 0.162.x. Version 0.157.1 works on the same machine. It has no "runtime read/execute validation" step.
Environment
@openai/codex)[windows] sandbox = "elevated"inconfig.tomlVersions
Repro, with the desktop app open:
With 0.162.1 every sandboxed command fails before it starts. This includes commands that never use node_repl, such as
python --version:Cause, from
%USERPROFILE%\.codex\.sandbox\sandbox.2026-10-14.log(user name redacted):With the desktop app open, several node_repl.exe processes run from that file. The ACL update on the file then fails with os error 32.
The helper handles the same error differently on two targets. For the user profile it logs "continuing setup". For node_repl.exe it treats the error as fatal: "setup refresh completed with errors", then "setup error: setup refresh had errors", then exit status 1. One locked runtime file disables the whole sandbox.
Did not help:
Workaround for CLI users:
This runs sandboxed shell commands normally with the desktop app open.
Expected:
A locked optional runtime should not disable the whole sandbox.
danpmradulescu commentedon Oct 15, 2026
I can reproduce the same failure with Codex CLI 0.162.1, installed through npm, on Windows 10 Pro 19045 x64.
A simple Get-Content command fails through exec_command before PowerShell starts:
helper_unknown_error: setup refresh had errors
The sandbox log reports an ACL operation failure on the bundled node_repl.exe:
The process cannot access the file because it is being used by another process. (os error 32)
PowerShell works outside Codex. New sessions and an attempt to stop the identified node_repl processes did not resolve it.
codex doctor --json reports sandbox.helpers: fail. Authentication and network checks pass. The background server is reported as not running; the desktop application is running.
Uploaded feedback thread:
01a14035-a17e-7c53-8810-2c6823bb2a67
laffo16 commentedon Oct 15, 2026
There's a fix for this already in the alpha build and merged into main (around 5 days ago).
Just a little suprised they havent shipped 163 (with this fix) a bit more urgently tbh as its a bad regression (at least for windows users) and basically stops apply patch tool under sandbox dead in its tracks.
For clarity, 162.1 doesn't contain the fix.
Shouldn't be long now i imagine, 163 must be a big update with alot of other things going into it.
laffo16 commentedon Oct 15, 2026
163 just dropped, grab your updates!
Avoid sharing violations when repairing Windows runtime ACLs #51822
Avoid sharing violations when repairing Windows runtime ACLs @johnl-oai