Skip to content

[Windows] All commands fail: "setup refresh had errors" #52179

Closed

Description

@Otaru25

What version of the Codex App are you using (From “About Codex” dialog)?

26.1002.52244

What subscription do you have?

None (using a custom model provider)

What platform is your computer?

your computer? Microsoft Windows NT 10.0.26200.0 x64

What issue are you seeing?

Since the 2026-10-08 update, every command fails immediately with:

helper_unknown_error: setup refresh had errors

The Windows sandbox cannot initialize, so no command can run at all. From
%USERPROFILE%.codex.sandbox\sandbox.2026-10-08.log:

runtime read/execute validation failed: validate runtime read/execute access on
C:\Users\<user>\AppData\Local\OpenAI\Codex\runtimes\cua_node\3dd31cfff853001c\bin\node_repl.exe:
open ACL target for root-only update: <file in use, cannot access> (os error 32)
setup refresh completed with errors: [...]
setup error: setup refresh had errors

Sandbox setup opens each file in the cua_node runtime to update its ACL. Those
files are held open by the runtime's own processes (codex-computer-use-swift.exe
and node_repl.exe), which the app spawns about 35 s after launch and keeps alive
for the whole app lifetime. The open therefore always fails with
ERROR_SHARING_VIOLATION, and because the setup fails closed, every command is
rejected. There is no window in which the app is running and those files are not
held open.

What steps can reproduce the bug?

  1. Start the Codex desktop app on Windows.
  2. Wait about 35 seconds (the computer-use helper processes start).
  3. Ask Codex to run any shell command.
  4. It fails immediately with "setup refresh had errors". Every later command fails the same way.

Timeline on this machine: the cua_node runtime directory was replaced during the
2026-10-08 15:17 update; the app restarted at 15:31 and its first setup attempt
failed at 15:31:10. That day: 242 failures, 0 successes. On 2026-09-28, before
the update, there were 0 failures all day — same machine, same user, same config.

What is the expected behavior?

Sandbox setup should not require opening files that its own runtime processes hold
open. Options: apply these ACEs at install time while the app is not running; skip
the update when the ACE is already correct; or provide a setting to skip runtime
ACL validation. Failing closed is the right behavior, but it currently makes the
sandbox permanently unusable on machines where this ordering occurs.

Additional information

Workarounds tried, all ineffective:

  • Restarting both the app and the machine
  • Disabling the computer-use plugin in the UI
  • Setting enabled = false for unified-computer-use@openai-bundled and commenting
    the notify hook in config.toml (the app restores both on startup)
  • Killing the holding processes (they respawn within seconds)
  • Renaming the cua_node runtime directory so the app re-materializes it
    (it does, but the fresh files fail identically)
  • Manually granting explicit read/execute ACEs on the runtime tree
    (inconclusive: the setup opens the file unconditionally)
  • Setting computer-use-bundled-plugin-auto-install-disabled = true in
    .codex-global-state.json (the value sticks, but the plugin stays enabled and
    the notify hook is re-registered)

Full log attached: %USERPROFILE%.codex.sandbox\sandbox.2026-10-08.log (232 KB)

sandbox.2026-10-08.log

Activity

  1. added
    app
    on Oct 8, 2026
  2. added
    bug
    windows-os
    sandbox
    on Oct 8, 2026
  3. Teknimedia commented on Oct 8, 2026

    @Teknimedia

    ’m experiencing the same error on Windows with app version 26.1002.52244. Restarting Windows and ChatGPT, retrying sandbox setup, and switching to unelevated did not help. Approved commands outside the sandbox work. Feedback ID: 01a11c4c-1cc0-7aa0-91cf-fe7781256c06.

  4. Tortip commented on Oct 9, 2026

    @Tortip

    Additional reproduction on Windows 11 Pro (10.0.22631, x64), observed on 2026-10-08.

    Environment:

    • Installed Windows package: OpenAI.Codex_26.1002.7124.0_x64 (package version, not read from the About dialog).
    • Bundled executable reports codex-cli 0.162.0-alpha.2.
    • Native Windows sandbox configured as elevated.
    • Runtime: %LOCALAPPDATA%\OpenAI\Codex\runtimes\cua_node\3dd31cfff853001c\bin\node_repl.exe.

    Observed:

    1. Browser automation fails during initialization, before a browser tab is opened.
    2. A minimal node_repl operation, nodeRepl.write('Motor disponible'), also fails with "trusted Node process exited unexpectedly; kernel reset, rerun your request". No browser control or imports are needed to reproduce.
    3. A sandboxed Get-Location fails before execution with "helper_unknown_error: setup refresh had errors".
    4. Explicitly approved, escalated shell execution works and allows collecting diagnostics.

    Sanitized current sandbox-log excerpt:

    runtime read/execute validation failed: validate runtime read/execute access on
    %LOCALAPPDATA%\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)
    setup refresh completed with errors: [...]
    setup error: setup refresh had errors
    

    Checks performed:

    • The user fully closed and reopened the desktop application. Process creation times independently confirmed that the app and current runtime processes were new. The same log error reappeared after that restart.
    • Resetting the JavaScript kernel and retrying did not resolve it.
    • The executable exists, and Get-Acl can read its security descriptor.
    • CodexSandboxUsers already has inherited ReadAndExecute and Synchronize permissions.
    • A read-only Windows Restart Manager query identified two node_repl.exe processes associated with the executable during the initial diagnosis. After the full application restart, newly created runtime processes were present again.
    • No processes were killed, no sandbox configuration or installation permissions were changed, and no antivirus attribution was established.

    This supports a reproducible sharing conflict in runtime ACL setup/validation. The precise internal handle/open-mode cause has not been established on this machine. It is not limited to stale processes left over from a previous app session.

    Expected: sandbox preparation and the minimal runtime operation should succeed while the desktop app is running.
    Impact: browser/computer automation is unavailable, and ordinary sandboxed shell execution is blocked.

    Only this sanitized diagnostic summary is being submitted; project files, credentials, personal paths, and full session logs are not included.

  5. davidchan83 commented on Oct 9, 2026

    @davidchan83

    Additional reproduction on Windows 11: the same error also prevents the browser-control JavaScript kernel from starting, and a verified full desktop-app restart does not resolve it.

    Environment:

    • Windows 11 Pro, version 10.0.22631 (build 22631).
    • Installed desktop MSIX package directory: OpenAI.Codex_26.1002.7124.0_x64. This is the observed package version, not a value read from the About dialog.
    • Bundled CLI reports codex-cli 0.162.0-alpha.2.
    • Windows sandbox configured as [windows] sandbox = "elevated"; affected session uses workspace-write permissions.

    Reproduction:

    1. Open a web chart in the desktop app's in-app browser.
    2. Ask the agent to access the existing tab through cua.getTab(..., { browser: "iab" }).
    3. The kernel exits before returning any tab state:
      windows sandbox failed: helper_unknown_error: setup refresh had errors.
    4. A harmless ordinary shell command also fails during sandbox initialization. An explicitly approved escalated diagnostic command succeeds.
    5. Fully terminate the desktop-app process tree and reopen the app.
    6. Retry browser initialization; the same failure returns.

    Restart was verified from process creation timestamps on 2026-10-09 (Asia/Kuala_Lumpur): the original desktop process was gone, a new parent process started at 10:50:39, and its fresh helpers started afterward. Setup still failed at 10:51:43.

    Relevant log excerpt, with the Windows username redacted:

    runtime read/execute validation failed:
    validate runtime read/execute access on
    C:\Users\<user>\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)
    setup refresh completed with errors: [...]
    setup error: setup refresh had errors
    

    During an earlier diagnostic attempt, stopping the specifically identified node_repl.exe helpers allowed setup to advance to another locked runtime file:

    ...\node_modules\@oai\sky\bin\windows\swift\x64\VCRUNTIME140_1.dll:
    open ACL target for root-only update:
    The process cannot access the file because it is being used by another process. (os error 32)
    

    The codex-computer-use-swift.exe helper was observed being recreated by the desktop app after termination. Resetting the JavaScript sessions and restarting helpers did not produce a durable recovery.

    Expected: the runtime and sandbox should initialize without failing on files held by the app's own helpers.

    Impact: in-app browser automation and ordinary sandboxed shell execution are blocked before user work begins. No chart state is returned.

    These are observed local diagnostics; the underlying code defect has not been independently established. No credentials, full session transcript, chart URL, or project data are included in this comment.

  6. Hendra827 commented on Oct 9, 2026

    @Hendra827

    This appears related to the OS error 32 / runtime ACL sharing-violation reports and PR #51822. For affected users, this is a complete blocker because every local task fails before execution. Could the team confirm whether the fix is in a released Windows Desktop build yet, and share a supported recovery path if not?

  7. preosia-droid commented on Oct 9, 2026

    @preosia-droid

    Additional independent reproduction on Windows 11 Pro x64, Codex CLI 0.162.0 (npm install), Windows AppX package 26.1002.7124.0 (package version, not About dialog version). Workspace: C:\LocalAI-Team.

    Even a read-only Get-Location fails before PowerShell launches with helper_unknown_error: setup refresh had errors. The sandbox log at 2026-10-09 08:34 local time reports runtime read/execute validation failed on %LOCALAPPDATA%\OpenAI\Codex\runtimes\cua_node\3dd31cfff853001c\bin\node_repl.exe, specifically open ACL target for root-only update ... (os error 32).

    Independent Process Monitor evidence captured during another reproduction at ~08:48 local time:

    • Process: codex-windows-sandbox-setup.exe
    • Operation: CreateFile
    • Target: node_repl.exe in the cua_node runtime
    • Result: SHARING VIOLATION
    • Desired Access: Read Attributes, Synchronize, Maximum Allowed
    • ShareMode: Read, Write, Delete

    A running node_repl.exe process was a child of the Codex managed app-server daemon. The file could be opened with exclusive read access from ordinary PowerShell both while Codex was closed and while running, outside the sandbox setup attempt. This suggests a conflict specific to the setup operation/access mask, rather than a permanent exclusive lock.

    Restarting Windows, closing the desktop app, stopping lingering Codex processes, updating/restarting the CLI, and retrying a fresh session did not resolve it. The alternate Node diagnostic runtime also failed with the same sandbox setup error. No sandbox protections were disabled or ACLs manually changed.

    This seems consistent with merged PR #51822, which changes Windows runtime ACL repair to avoid MAXIMUM_ALLOWED on active executable files. Could maintainers confirm which released Windows CLI/app-server build includes that fix and a supported upgrade path? We have not verified whether 0.162.0 includes it.

    Additional related reports: #51925, #52334.

  8. Yujay-Law commented on Oct 9, 2026

    @Yujay-Law

    Additional independent reproduction on Windows, observed on 2026-10-09.

    Confirmed environment:

    • Codex desktop app version: 26.1002.52244, build 13536, prod channel. These values were returned by the app's information-only update check.
    • Local session uses workspace-write permissions and PowerShell. Exact Windows build and native sandbox implementation could not be collected because process startup fails.

    Minimal reproduction:

    1. Ask the local agent to run the read-only PowerShell command Get-Location.
    2. It fails before PowerShell starts:
      exec_command failed: CreateProcess { message: "Rejected(\"Failed to create unified exec process: helper_unknown_error: setup refresh had errors\")" }
    3. Run only nodeRepl.write('diagnostic'); in the bundled JavaScript tool.
    4. It returns trusted Node process exited unexpectedly; kernel reset, rerun your request.
    5. The browser-control entry point await cua.getState(); also fails with the same trusted Node process error before returning UI state.

    Other observed evidence:

    • An earlier JavaScript startup failure reported windows sandbox failed: helper_unknown_error: setup refresh had errors, with the kernel exiting with code 1.
    • Explicitly resetting the JavaScript kernel and retrying did not restore it.
    • Repeated read-only shell attempts in the same chat also fail before execution.
    • Read-only app metadata and cloud GitHub connector calls still work, so the application is not completely disconnected.
    • The update check returned unavailable because the Windows Store must check installation eligibility; no download or installation was started. We cannot conclude that the app is up to date.

    Impact: all local file work and browser automation are blocked before user work begins.

    This report contains only confirmed tool errors and app version metadata. Local sandbox logs could not be read, so an OS error 32 or ACL sharing conflict has NOT been confirmed on this machine. No business files, personal paths, credentials, or full chat transcript are included.

    Could maintainers confirm a supported desktop recovery/update path and which released Windows desktop build includes the runtime ACL repair fix in #51822?

  9. DoctorHsp commented on Oct 9, 2026

    @DoctorHsp

    Additional data point from a Windows machine hitting the same failure
    (Codex app 26.1002.52244, build 13536; Store package OpenAI.Codex_26.1002.7124.0_x64).
    Two findings that may narrow the fix:

    1. It is not an OS-level file lock. Opening the running node_repl.exe for an ACL update
    succeeds on this machine:

    CreateFileW(path, WRITE_DAC|READ_CONTROL, dwShareMode=7,  OPEN_EXISTING) -> SUCCESS
    CreateFileW(path, WRITE_DAC|READ_CONTROL, dwShareMode=0,  OPEN_EXISTING) -> SUCCESS
    

    (same file, both while node_repl.exe was running; a non-running copy behaves identically.)
    So Windows does allow ACL updates on a loaded image. ERROR_SHARING_VIOLATION must therefore
    come from the setup's own "runtime read/execute validation" path — i.e. an image-level
    validation/mapping of a file that already has an active image section — not from a plain
    "file is held open" condition.

    2. Timeline and the exact behavior of the "kill the helper" workaround

    • Store package installed 2026-10-08 08:45:28 local; helper binaries materialized
      08:46:55–08:48:17; first runtime read/execute validation failed line at 08:50:06.
      In sandbox.2026-09-30.log (previous version) this error appears 0 times;
      in sandbox.2026-10-08.log it appears 186 times.
    • Terminating only node_repl.exe (both instances, leaving the other cua_node processes alone)
      makes the next setup refresh succeed. It does not respawn while the app keeps running —
      we polled at +5 s / +15 s / +30 s and found 0 processes from that runtime tree.
    • Cost of that workaround, matching the computer-use label on this issue: for the remainder of
      that app run the js / computer-use tooling fails with Transport closed, because its MCP
      server is gone and is not restarted.
    • config.toml is rewritten by the app on every launch (mtime equals app launch time, and
      [mcp_servers.node_repl] embeds a per-launch pipe GUID such as
      \\.\pipe\codex-computer-use-<guid>), so any config-level attempt to keep node_repl from
      starting does not survive a restart.
    • Switching the agent mode to full access avoids the sandbox setup path entirely
      (no further writes to .codex\.sandbox\sandbox.<date>.log), which is the only zero-maintenance
      workaround we found.

    3. Verbatim log excerpt (.codex\.sandbox\sandbox.2026-10-09.log):

    [2026-10-09 16:01:40.859 codex.exe] setup refresh: spawning ...\codex-windows-sandbox-setup.exe (cwd=..., payload_len=4280)
    [2026-10-09T08:01:40.935707100+00:00] runtime read/execute validation failed: validate runtime read/execute access on
      C:\Users\<user>\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)
    [2026-10-09T08:01:40.943786100+00:00] setup refresh: processed 3 write roots (read roots delegated); errors=[...]
    [2026-10-09T08:01:40.943822500+00:00] setup refresh completed with errors: [...]
    [2026-10-09T08:01:40.943848100+00:00] setup error: setup refresh had errors
    [2026-10-09 16:01:40.949 codex.exe] setup refresh: exited with status ExitStatus(ExitStatus(1))
    

    and .codex\.sandbox\setup_error.json:

    { "code": "helper_unknown_error", "message": "setup refresh had errors" }

    Same content is in %USERPROFILE%\.codex\.sandbox\sandbox.<date>.log for every command attempt.

    Question: is there a build newer than 26.1002.7124.0 that addresses this? The setup appears to
    fail closed, so on this configuration the sandbox has been unusable since the 2026-10-08 update.

  10. alanwang1818 commented on Oct 9, 2026

    @alanwang1818

    Additional A/B result from Windows 10 Enterprise LTSC (10.0.19044), 2026-10-09. Installed Store package: OpenAI.Codex_26.1002.7124.0_x64; bundled CLI: codex-cli 0.162.0-alpha.2.

    This machine first had a separate native-sandbox provisioning failure (helper_sandbox_lock_failed) caused by ownership of %USERPROFILE%\.codex\.sandbox-bin. After changing only that directory's owner to BUILTIN\Administrators, I tested the elevated sandbox with a dedicated workspace root:

    1. Fully close the Codex desktop app and helpers. Run the same codex sandbox -C <dedicated test directory> --include-managed-config --permission-profile :workspace -- cmd.exe /d /c echo ... probe twice with [windows] sandbox = "elevated". Both pass.
    2. Reopen the desktop app. The identical elevated probe fails with helper_unknown_error: setup refresh had errors. The sandbox log identifies cua_node\...\bin\node_repl.exe, open ACL target for root-only update, and Windows os error 32.
    3. Restore [windows] sandbox = "unelevated". The same workspace-profile probe passes with exit code 0.

    The initial .sandbox-bin ownership problem is resolved, but the active-runtime setup failure remains reproducible only when the desktop app is open on this machine. No personal paths, credentials, or full logs are included.

  11. evangelineak commented on Oct 9, 2026

    @evangelineak

    Reproduced on Windows with desktop app 26.1002.52244, MSIX package 26.1002.7124.0, and bundled CLI 0.162.0-alpha.2.

    On October 9, 2026 (UTC+8), a workspace-write session failed before executing Get-Location, reporting helper_unknown_error: setup refresh had errors. Full-access execution succeeded; this does not establish sandbox recovery.

    At 17:18, sandbox logs reported Windows error 32 while validating node_repl.exe. After releasing its verified users, a separate sandbox CLI test at 17:25 failed on VCRUNTIME140_1.dll under the bundled Computer Use runtime.

    The DLL was used by codex-computer-use-swift.exe. After that verified process was terminated, the desktop app spawned a replacement that loaded the same DLL. Following another restart, a new helper process started at 17:49:19 and again loaded the DLL.

    The “Any App” toggle’s disabled state has not been verified, and no post-restart sandbox test has been completed. Microsoft Store offered no update. No further processes are being terminated.

    Please advise whether a supported control can stop this helper from restarting, and which release fixes this runtime-file sharing conflict.

  12. glossmaster2707-bit commented on Oct 9, 2026

    @glossmaster2707-bit

    Confirmed on another machine on 2026-10-09.

    Environment:

    • Windows 10 build 19045 (reported by the earlier local diagnostic run).
    • Installed desktop package: OpenAI.Codex 26.1002.7124.0.
    • Bundled backend: codex-cli 0.162.0-alpha.2.
    • Windows sandbox implementation: elevated.
    • cua_node runtime: 3dd31cfff853001c.

    Fresh reproduction:

    • Browser tool initialization (cua.getState()) fails before browser discovery.
    • Tool stderr: windows sandbox failed: helper_unknown_error: setup refresh had errors; kernel exits with code 1.
    • Normal sandboxed shell commands also fail before execution with Failed to create unified exec process: helper_unknown_error: setup refresh had errors.
    • Fresh sandbox log identifies node_repl.exe: open ACL target for root-only update: <file in use> (os error 32).

    The previous local recovery attempt adds a useful comparison: while the desktop app was closed, the bundled native sandbox probe (codex sandbox --include-managed-config --permission-profile :workspace -- cmd.exe /d /c echo SANDBOX_PROBE) succeeded with exit code 0. After reopening the app, the same error 32 returned and ordinary shell/browser tool startup failed again. Restarting the affected helpers had also failed to restore startup. These earlier attempts were recorded in local diagnostic files; this report's fresh reproduction did not repeat the restart cycle.

    A previous nonpersistent MXC probe reported that native MXC was unavailable on this executor. No sandbox implementation, ACLs, browser profiles, or application binaries were changed during the fresh diagnostic run.

    This supports the same runtime file-lock/setup conflict described here; the exact underlying source-code defect is not established. The local diagnostic archive is available if maintainers provide a private upload channel. Raw logs and identifying local paths are omitted from this public comment.

  13. hardill commented on Oct 10, 2026

    @hardill

    Additional independently observed reproduction on Windows, with file-user verification.

    Environment

    • Windows 11 Home x64, version 10.0.26100 (build 26100).
    • Desktop app client version recorded in app-server logs: 26.1002.52244.
    • Installed Windows app package: OpenAI.Codex_26.1002.7124.0_x64.
    • Desktop-bundled backend: codex-cli 0.162.0-alpha.2.
    • PowerShell 7.6.3.
    • Configuration: sandbox_mode = "workspace-write", windows.sandbox = "elevated".
    • Desktop integrated terminal configuration was verified as integratedTerminalShell = "powershell".
    • Both the system Node and Codex's separately located bundled Node report v24.21.0. The affected executable and its running processes are in Codex's bundled runtime directory, not the system Node installation.

    Observed failure and control

    During diagnosis on 2026-10-10, a minimal sandboxed PowerShell command, $PSVersionTable.PSVersion.ToString(), failed before execution with:

    Failed to create unified exec process:
    helper_unknown_error: setup refresh had errors
    

    The same PowerShell executable ran successfully through an approved non-sandboxed execution path. Git Bash also started successfully outside the sandbox. Changing the integrated shell to PowerShell did not resolve the sandbox failure.

    A sanitized excerpt of the sandbox log at 09:29:26 UTC+08:00:

    runtime read/execute validation failed:
    validate runtime read/execute access on
    %LOCALAPPDATA%\OpenAI\Codex\runtimes\cua_node\3dd31cfff853001c\bin\node_repl.exe:
    open ACL target for root-only update:
    另一个程序正在使用此文件,进程无法访问。 (os error 32)
    
    setup refresh completed with errors: [...]
    setup error: setup refresh had errors
    setup refresh: exited with status ExitStatus(ExitStatus(1))
    

    The localized message means: "The process cannot access the file because it is being used by another process."

    File-user evidence

    A read-only Windows Restart Manager query (RmStartSession, RmRegisterResources for the exact executable, RmGetList, then RmEndSession; no shutdown/restart API was called) identified four processes using that exact node_repl.exe:

    PID Image Parent PID / image
    7580 node_repl.exe 14484 / codex.exe
    26108 node_repl.exe 14484 / codex.exe
    23496 node_repl.exe 13608 / Codex-bundled node.exe
    15544 node_repl.exe 9116 / Codex-bundled node.exe

    Process metadata showed that both parent Node processes were children of codex.exe PID 14484, which was itself a child of the desktop ChatGPT.exe PID 20964. All four executable paths pointed to the same Codex-bundled runtime file in the log above.

    Interpretation and limits

    This supports investigating an interaction between Codex-owned runtime process lifetimes and sandbox ACL refresh. It does not identify which of the four processes caused the incompatible sharing condition, or establish the helper's exact file-opening flags. No process was terminated and no runtime ACL, security setting, or configuration was changed during this diagnosis; recovery after terminating the processes has not been tested on this machine.

    The user also saw a workspace-settings loading error, but its causal relationship to this sandbox failure has not been established; observed config/read responses included successful results.

    Please investigate whether runtime ACL validation can safely coexist with active Codex-owned runtime processes while preserving sandbox security. Only sanitized excerpts are included; no full logs, credentials, user profile name, or project contents are being uploaded.

  14. AHZNB commented on Oct 10, 2026

    @AHZNB

    Additional reproduction on Windows 10: the same runtime-file sharing violation blocks both in-app browser automation and the native desktop-control runtime, including after the conversation was switched to full access.

    Environment

    • Windows 10 Home x64, version 10.0.19045, build 19045 (read from the OS).
    • Desktop app updater reported version 26.1002.52244, build 13536, production channel, with no eligible update on October 8, 2026.
    • Bundled cua_node runtime directory: 3dd31cfff853001c.
    • Reproduced October 8 and October 10, 2026.

    Reproduction on this installation

    1. Open a page in the desktop app's in-app browser; the user can view it normally.
    2. Request browser discovery using await cua.getState();, or use the supported cua.getTab / cua.createBrowserTab("iab", ...) entry point.
    3. The JavaScript kernel exits before returning any browser or page state.
    4. Reset the browser JavaScript session and retry; the same failure returns.
    5. A native desktop-control fallback also fails during @oai/sky initialization through node_repl, before any window observation or input.

    Tool diagnostics:

    node_repl kernel exited unexpectedly
    kernel_status: exited(code=1)
    windows sandbox failed: helper_unknown_error: setup refresh had errors
    reason: stdout_eof
    

    Some attempts instead return trusted Node process exited unexpectedly; kernel reset, rerun your request.

    Sanitized sandbox evidence

    The October 10 log records the following at 03:37:23 UTC:

    runtime read/execute validation failed:
    validate runtime read/execute access on
    %LOCALAPPDATA%\OpenAI\Codex\runtimes\cua_node\3dd31cfff853001c\bin\node_repl.exe:
    open ACL target for root-only update:
    另一个程序正在使用此文件,进程无法访问。 (os error 32)
    setup refresh completed with errors: [...]
    setup error: setup refresh had errors
    setup refresh: exited with status ExitStatus(ExitStatus(1))
    

    The localized error means the file is in use by another process.

    Recovery attempts and comparison

    • Fully restarting the desktop app did not restore access. Process creation timestamps confirmed that the observed runtime processes after restart were newly started, rather than the previously observed processes.
    • JavaScript session reset and retry did not help.
    • Ordinary sandboxed shell execution initially failed with the same setup-refresh error, while explicitly approved execution outside the sandbox succeeded.
    • On October 10, the conversation's reported effective permissions changed to danger-full-access with unrestricted filesystem access. Shell execution then worked without an escalation parameter. Browser/runtime initialization still reported the Windows sandbox error above. This is an observed difference between tool paths, not a claim that changing permissions repaired the sandbox.
    • No runtime processes were terminated, runtime files replaced, or ACLs manually changed during these checks. A Windows reboot was suggested but was not verified as performed.

    Expected behavior / impact

    The supported browser and desktop-control runtimes should initialize while the app is running, or report an actionable supported recovery path. They currently fail before any page/window can be read, blocking browser-based work independently of the website.

    Please investigate runtime ACL-refresh/file-sharing behavior and whether the browser/runtime launch path is honoring the conversation's effective execution permissions. The exact incompatible handle owner and internal code defect have not been established on this machine.

    This report contains only sanitized technical observations. No personal paths, private URLs, account contact details, screenshots, project content, credentials, session transcript, or raw log files are attached.

  15. KelssDX commented on Oct 10, 2026

    @KelssDX

    Additional reproduction on Windows, observed on 10 October 2026.

    Installed Windows package (read with Get-AppxPackage): OpenAI.Codex 26.1002.7124.0. This is the package version, not a version read from the About dialog. The affected conversation uses workspace-write permissions.

    The user can view and sign in to a website in the desktop app's in-app browser, but the agent cannot initialize either browser control or native Computer Use:

    • cua.getState() and cua.getTab(..., { browser: "iab" }) fail before returning browser state.
    • Importing @oai/sky in node_repl also fails before any window discovery or interaction.
    • Multiple JavaScript-kernel resets and retries do not restore access.
    • The user reported restarting the app; that restart was not independently verified in this diagnostic run.

    Tool failures include:

    node_repl kernel exited unexpectedly
    kernel_status: exited(code=1)
    windows sandbox failed: helper_unknown_error: setup refresh had errors
    reason: stdout_eof
    

    Other attempts return: "trusted Node process exited unexpectedly; kernel reset, rerun your request".

    The local sandbox log at 2026-10-10 06:39:07 UTC independently confirms:

    runtime read/execute validation failed:
    validate runtime read/execute access on
    %LOCALAPPDATA%\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)
    setup refresh completed with errors: [...]
    

    Approved escalated shell diagnostics work. A separate Playwright browser connection also works, but has a separate signed-out session and cannot substitute for control of the user's signed-in app browser.

    Expected: both supported browser control and Computer Use should initialize and access the selected browser/window. Actual impact: an authorized online registration task is blocked before the agent can interact with the user's signed-in session.

    This confirms the same runtime-file sharing error reported here; the exact locking process and underlying code defect were not established. No process was terminated and no runtime files, ACLs, or security settings were changed during this diagnostic run.

    Only this sanitized technical summary is submitted. No credentials, account identifiers, company documents, private URLs, screenshots, personal paths, or full logs are included.

  16. ruochiliu123 commented on Oct 10, 2026

    @ruochiliu123

    I reproduced a pre-launch setup failure in a dot-created task on native Windows.

    Version metadata collected on October 10, 2026 at 01:41 UTC showed Windows package 26.1002.7124.0 and application resource version 26.1002.52244. I have not verified that these readings remained unchanged during later same-day tests.

    Ordinary local execution failed before the requested command started:
    helper_unknown_error: setup refresh had errors

    A supported, explicitly approved execution path later succeeded in checking the desktop directory and writing a diagnostic record. The ordinary sandbox path still failed. We have not confirmed a runtime ACL sharing violation or Windows error 32 in this reproduction, and have not tested a newer release.

    Please provide a supported recovery or upgrade path that preserves sandbox protections, with a verification test for ordinary command execution.

  17. Yawlu commented on Oct 11, 2026

    @Yawlu

    Workaround that fixed it for me (Codex CLI 0.162.1, Windows 11):
    the CLI itself starts node_repl.exe via the [mcp_servers.node_repl] entry that the desktop app writes into ~/.codex/config.toml, so the sandbox setup then hits os error 32 on cua_node...\node_repl.exe.
    Fix: quit the desktop app, then in config.toml comment out the whole [mcp_servers.node_repl] and [mcp_servers.node_repl.env] sections, comment out the notify line pointing at codex-computer-use.exe, and set enabled = false for "unified-computer-use@openai-bundled" and "computer-use@openai-bundled". After that sandboxed commands run normally. The app will likely re-add these on next launch.

  18. SouthCarpet commented on Oct 11, 2026

    @SouthCarpet

    Another data point from Windows 11 Home (10.0.26300), Node v25.8.1, Codex CLI from npm, used non-interactively through codex exec --sandbox workspace-write:

    Version matrix on the same machine (October 7 to 11, 2026)

    build source result
    codex-cli 0.160.1 npm @openai/[email protected] every run works, sandbox banner workspace-write
    codex-cli 0.161.0 npm @openai/codex@latest on Oct 7 and 8 every exec_command fails: helper_unknown_error: setup refresh had errors
    codex-cli 0.162.1 npm @openai/codex@latest on Oct 11 same failure
    codex-cli 0.162.0-alpha.17.2 the Codex desktop app's own binary under %LOCALAPPDATA%\OpenAI\Codex\bin\<hash>\codex.exe works (commands execute), while 0.162.1 from npm fails at the same minute

    The failing refresh line (%USERPROFILE%\.codex\.sandbox\sandbox.<date>.log):

    setup refresh completed with errors: ["runtime read/execute validation failed: validate runtime read/execute access on \\?\C:\Users\<user>\AppData\Local\OpenAI\Codex\runtimes\cua_node\<hash>\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)"]
    setup error: setup refresh had errors
    setup refresh: exited with status ExitStatus(ExitStatus(1))
    read-acl-only mode: applying read ACLs
    read ACL run completed
    

    Observations that may help narrow it down:

    • The failure is in the write-roots refresh only. codex exec -s read-only keeps working on the same build at the same time.
    • The lock on node_repl.exe is transient: on Oct 7 no process held the file a few minutes after 51 failed refreshes in a row, and a direct probe then passed. While the desktop app (or a second codex process) is running, the refresh fails every time.
    • A read-acl-only run right after the failed refresh succeeds, so the ACL work itself is possible; it is the root-only update of the runtime binary that collides with the open handle.
    • Reinstalling 0.160.1 restores every run immediately, with the same config.toml and the same .sandbox-bin helpers present.

    Workaround we use: pin npm i -g @openai/[email protected] and run a one-command probe before each batch. Happy to run a diagnostic build or collect more logs if useful.

  19. Otaru25 commented on Oct 12, 2026

    @Otaru25
    Author

    Confirmed fixed on 26.1007.2314.0 — back on [windows] sandbox = "elevated", no workaround needed. Details in #51638.

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

    appbugcomputer-usesandboxwindows-os

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions