Skip to content

Windows Codex 26.1002.7124.0: elevated sandbox ACL refresh fails on running node_repl.exe (os error 32); process timeline #52432

Open

Description

@a-Lin-oss

Environment

  • Codex Desktop Windows package: OpenAI.Codex_26.1002.7124.0_x64__2p2nqsd0c76g0
  • Windows 11 Home, build 26100, x64
  • Config: [windows] sandbox = "elevated"
  • Test workspace: C:\CodexTest (simple local directory)
  • Date: 2026-10-09

Problem

Even a read-only pwd / directory listing fails before shell execution with helper_unknown_error: setup refresh had errors. Sandbox logs repeatedly show:

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 error: setup refresh had errors
setup refresh: exited with status ExitStatus(ExitStatus(1))

Reproduction

  1. Fully quit Codex, confirm no codex.exe or node_repl.exe processes remain.
  2. Start Codex Desktop with elevated Windows sandbox configured.
  3. Open C:\CodexTest, ask to execute pwd and list files without modifying anything.
  4. Command fails during sandbox setup; error 32 targets the bundled node_repl.exe.

Diagnostic process timeline

Local timestamps on 2026-10-09 (UTC+08:00); obtained by polling Win32_Process and comparing with sandbox log timestamps:

  • 14:27:52: codex.exe PID 22776 starts
  • 14:27:53: codex.exe PID 18124 starts
  • 14:28:02: node_repl.exe PIDs 5268 and 23768 start (parents 1732 and 18124)
  • 14:28:13–14:29:24: additional node_repl.exe instances appear
  • 14:30:12: codex-windows-sandbox-setup.exe PID 5072 starts (parent 18124)
  • 14:30:14: sandbox log reports ACL update sharing violation on node_repl.exe (os error 32), then exit status 1

Process Explorer showed node_repl.exe loaded from the same cua_node runtime path. The exact file-sharing flags and underlying cause have not been established; process ordering is observed, causation remains a hypothesis.

Troubleshooting performed

  • Rebooted Windows; confirmed no node_repl.exe before launching Codex.
  • Fully exited Codex and checked for leftover processes.
  • Verified the executable exists and its ACL can be read; owner is the current Windows user.
  • Renamed/backed up cua_node with Codex closed; Codex regenerated it, but the same error recurred.
  • Retested repeatedly with read-only commands; elevated consistently fails.
  • Switching to [windows] sandbox = "unelevated" restores shell command execution (temporary workaround).

Expected

The elevated Windows sandbox should initialize and run authorized read-only commands even if Codex runtime helpers are already active. Please investigate ACL target opening/sharing behavior and runtime helper startup coordination, and advise on a supported fix or safe rollback.

Related reports: #52389, #52360, #51969. No private repository data, user account name, or unredacted log files are included.

Activity

  1. added
    bug
    app
    windows-os
    sandbox
    on Oct 9, 2026
  2. KenanM-CL commented on Oct 9, 2026

    @KenanM-CL

    Same failure here, and I think I can pin the cause: the setup helper requests GENERIC_WRITE on the runtime binary when it only needs WRITE_DAC. Windows allows a DACL update on a running image; it refuses write-data with ERROR_SHARING_VIOLATION (32).

    Environment

    • Codex Desktop package 26.1002.7124.0 (app/runtime 26.1002.52244), SignatureKind=Store
    • Windows 11 Pro, build 10.0.26200.9457
    • [windows] sandbox = "elevated"

    Failing operation

    runtime read/execute validation failed: validate runtime read/execute access on
      ...\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)
    

    That single entry puts the setup helper into errors=[...] → exit 1 → helper_unknown_error: setup refresh had errors → unified exec is never created, so every command fails, including read-only ones.

    The holder is Codex itself: codex.exe spawns node_repl.exe as an MCP server ~13s before the setup refresh runs. From one launch's log:

    12:07:15  node_repl.exe started (child of codex.exe)
    12:07:17  second node_repl.exe under the computer-use node tree
    12:07:28  setup refresh -> sharing violation on that same running image
    

    Ordering is deterministic, which is why app restarts and reboots never recover it.

    Evidence that the access mask is the bug

    Raw CreateFileW probes against the exact file while it is running:

    Desired access Share mode Result
    WRITE_DAC (0x40000) all OK
    WRITE_DAC none OK
    WRITE_DAC | WRITE_OWNER none OK
    READ_CONTROL all OK
    GENERIC_WRITE all FAIL err=32
    GENERIC_WRITE none FAIL err=32

    Negative control: the same binaries when not running accept GENERIC_WRITE without complaint. So this is not AV, not a stale handle, and not a third-party lock — it is write-data access being requested against a running image.

    Minimal probe:

    Add-Type -TypeDefinition @'
    using System; using System.Runtime.InteropServices;
    public class P {
      [DllImport("kernel32.dll", SetLastError=true, CharSet=CharSet.Unicode)]
      public static extern IntPtr CreateFileW(string p, uint a, uint s, IntPtr sec, uint d, uint f, IntPtr t);
      [DllImport("kernel32.dll", SetLastError=true)] public static extern bool CloseHandle(IntPtr h);
      public static string Try(string path, uint access) {
        IntPtr h = CreateFileW(path, access, 7, IntPtr.Zero, 3, 128, IntPtr.Zero);
        if (h == (IntPtr)(-1)) return "FAIL err=" + Marshal.GetLastWin32Error();
        CloseHandle(h); return "OK";
      }
    }
    '@
    $f = "$env:LOCALAPPDATA\OpenAI\Codex\runtimes\cua_node\<hash>\bin\node_repl.exe"
    "WRITE_DAC     : " + [P]::Try($f, 0x40000)      # OK while running
    "GENERIC_WRITE : " + [P]::Try($f, 0x40000000)   # FAIL err=32 while running

    Controlled A/B isolating the sandbox mode

    codex sandbox -- <exe> exercises the same path with no model call, so this is reproducible headlessly. With the desktop app closed and node_repl.exe started manually to hold the image open, the only variable being sandbox mode:

    codex sandbox -c windows.sandbox="elevated"   -- whoami.exe
      -> windows sandbox failed: helper_unknown_error: setup refresh had errors
      -> exit 1; log: runtime read/execute validation failed ... (os error 32)
    
    codex sandbox -c windows.sandbox="unelevated" -- whoami.exe
      -> <domain>\<user>
      -> exit 0; log: setup refresh: processed 0 write roots; errors=[]
    

    With node_repl.exe not running, elevated also succeeds and setup_error.json is deleted. So the trigger is precisely "runtime binary is running during the elevated setup refresh".

    Regression window

    ~/.codex/.sandbox/sandbox.<date>.log, same machine:

    • 2026-10-05, 2026-10-06: 0 occurrences of runtime read/execute validation
    • 2026-10-08: 72, beginning at the first sandbox event of the day (10:42:54 local)

    The step appears to be new in the Oct 8 build. A later Oct 8 update shipped a new cua_node hash and did not fix it.

    Suggested fix

    Request WRITE_DAC (plus READ_CONTROL if the current DACL is read first) rather than GENERIC_WRITE when applying ACLs to runtime files. The probe above shows that succeeds against the running image, so the whole chicken-and-egg disappears without any process-ordering changes.

    Two secondary notes:

    • Worth auditing the whole runtime ACL pass, not just node_repl.exe — Windows app 26.1002.7124.0: sandbox setup error 32 on VCRUNTIME140_1.dll blocks local commands #52216 reports the same error 32 on VCRUNTIME140_1.dll, consistent with one over-broad mask applied to every runtime file.
    • helper_unknown_error: setup refresh had errors collapses the entire errors[] array into one opaque string. Surfacing the first underlying error in the UI would have saved everyone in these threads a lot of time — unrelated root causes currently produce identical text (e.g. the path-specific August report on 26.818.5229.0).

    Workaround that restores execution without a rollback: set [windows] sandbox = "unelevated" in ~/.codex/config.toml. That key is user-owned and survives the app's config rewrite, unlike [mcp_servers.*]. It does weaken the isolation boundary (restricted token under the user's own account rather than the separate CodexSandbox{Offline,Online} principals), so it's a stopgap, not a fix.

  3. Hendra827 commented on Oct 9, 2026

    @Hendra827

    I'm also tracking this regression in my reports #51932 and #52409. The same Windows Desktop sandbox Error 32 is still being reported across multiple fresh issues, including after restart/reboot, and PR #51822 does not by itself confirm which Desktop build contains the fix. Could the maintainers identify one canonical issue for tracking, confirm whether the fix has shipped in a Windows Desktop build, and share a supported recovery path that preserves the elevated sandbox? My support case has been escalated, but I have not received an engineering status or release timeline yet.

  4. swampind commented on Oct 10, 2026

    @swampind

    Additional affected user, confirmed on 11 October 2026. This blocks browser automation and Node REPL startup in the Windows desktop app, as well as ordinary sandboxed shell commands.

    Environment

    • Installed Windows package: OpenAI.Codex 26.1002.7124.0 (read from Get-AppxPackage).
    • Bundled executable: codex-cli 0.162.0-alpha.2 (codex.exe --version).
    • Windows 11 Pro 25H2, build 26200.9168, x64.
    • Configured [windows] sandbox = "elevated".
    • Affected chat uses read-only filesystem permissions and automatic approval review.
    • Affected runtime: %LOCALAPPDATA%\OpenAI\Codex\runtimes\cua_node\3dd31cfff853001c\bin\node_repl.exe.

    Observed reproduction and errors

    1. Open an existing local workspace/chat and request browser work.
    2. A basic browser inventory call, await cua.getState(), fails before any browser interaction.
    3. Reset the separate Node REPL and request only nodeRepl.write('Runtime connection check');. This also fails before the JavaScript executes.
    4. Restart the Codex app, return to the chat, and retry. Both failures persist.

    The tool returns:

    node_repl kernel exited unexpectedly
    windows sandbox failed: helper_unknown_error: setup refresh had errors
    

    The sandbox log records:

    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 refresh: exited with status ExitStatus(ExitStatus(1))
    

    Post-restart process timeline

    Local times, Australia/Sydney (UTC+11), 11 October 2026:

    • codex.exe parent starts at 09:35:42.
    • Six observed node_repl.exe processes start between 09:35:55 and 09:36:18, with the current codex.exe and node.exe helpers as parents.
    • Sandbox setup logs the runtime sharing violation at 09:36:21.

    All observed runtime processes started after the app restart. We did not establish a stale pre-restart process or identify the precise lock owner. These observations are consistent with the reported startup/access-control conflict; we have not independently verified the access-mask hypothesis.

    Recovery attempted and impact

    • Browser runtime reset and fresh startup attempts failed.
    • Separate Node REPL reset and minimal text-output test failed.
    • User restarted Codex; the error immediately returned.
    • Explicitly approved escalated shell commands still work, allowing local diagnostics and file preparation, but that does not restore the browser tool.
    • No sandbox-mode, ACL or security-setting changes, broad process termination, or runtime-file deletion were performed.
    • A Windows reboot was not attempted because other work is running. It is not a viable required recovery step during the workday.

    This has stopped a production browser workflow despite its assets already being prepared. Please provide a supported fix or recovery that preserves the elevated sandbox, and surface the underlying sharing-violation error instead of only setup refresh had errors.

    Personal paths, workspace/project details, session contents and credentials are omitted. This comment is submitted at the affected user's request.

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

    appbugsandboxwindows-os

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions