Skip to content

[Windows] Sandbox setup fails when Codex’s own node_repl.exe is running (os error 32) #52504

Open

Description

@Algorytm

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

26.1002.52244

What subscription do you have?

Plus

What platform is your computer?

Microsoft Windows NT 10.0.19045.0 x64

What issue are you seeing?

Summary
Codex on Windows cannot execute shell commands because sandbox setup fails while opening its own running node_repl.exe to update its ACL. Even a simple Get-Location fails before PowerShell starts.
The logs suggest a coordination issue between the runtime lifecycle and sandbox permission setup.

Environment

  • Windows, native Codex desktop app
  • PowerShell 7
  • Sandbox mode: workspace-write
  • Date observed: October 9, 2026
  • Codex binary directory: ...\OpenAI\Codex\bin\9691020b546a15b2
  • Affected runtime: ...\OpenAI\Codex\runtimes\cua_node\3dd31cfff853001c\bin\node_repl.exe

Issue

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

Relevant sandbox log, with the user profile path shortened:

[2026-10-09 11:15:59.471 codex.exe] START:
C:\Program Files\PowerShell\7\pwsh.exe -NoProfile -Command ...
Get-Location

[2026-10-09T09:15:59.618805700+00:00]
runtime read/execute validation failed:
validate runtime read/execute access on
...\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-09T09:15:59.622343200+00:00]
setup error: setup refresh had errors

[2026-10-09 11:15:59.625 codex.exe]
setup refresh: exited with status ExitStatus(ExitStatus(1))

Process diagnostics:
Sysinternals Handle and Get-CimInstance Win32_Process showed two running instances of the exact executable named in the error:
Process PID Parent PID Parent process
node_repl.exe 35908 41000 codex.exe
node_repl.exe 50544 51276 node.exe

Both executable paths were:
C:\Users\root\AppData\Local\OpenAI\Codex\runtimes\cua_node\3dd31cfff853001c\bin\node_repl.exe
Handle showed process/thread handles, not a file handle identifying the precise lock owner. Therefore, the running runtime is a strong lead, but the exact locking mechanism has not been independently confirmed.

What steps can reproduce the bug?

  1. Open a local project in Codex.
  2. Ask the agent to execute a shell command, such as Get-Location.
  3. Codex launches codex-windows-sandbox-setup.exe.
  4. Sandbox setup attempts to validate/update read and execute permissions on node_repl.exe.
  5. Windows returns a sharing violation, and command execution fails.

What is the expected behavior?

Codex should prepare runtime permissions before launching the runtime, or otherwise handle permission validation without failing when its own runtime is already running.

Additional information

  • All attempted sandboxed shell commands fail, including read-only commands.
  • Disabling PowerShell profile loading does not help.
  • An approved execution outside the sandbox successfully read the diagnostic log.
  • No project code needs to execute to trigger the failure.
  • No reliable recovery procedure has been confirmed.
    Please investigate synchronization between cua_node startup and Windows sandbox ACL setup.

sandbox.2026-10-09.log

Activity

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

    @mansguvenal

    I can confirm the same issue on my Windows installation.

    Environment:

    • Codex Desktop version: 26.1002.52244
    • Runtime: cua_node/3dd31cfff853001c
    • Sandbox setup helper: 9691020b546a15b2
    • Observed: October 9, 2026

    Observed behavior:

    All local shell commands fail before execution, including basic read-only commands such as Get-Location, Get-ChildItem, and cmd /c cd.

    The error is:

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

    My sandbox log confirms:

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

    Troubleshooting performed:

    • Restarted Codex Desktop.
    • Created new Codex sessions.
    • Restarted Windows completely.
    • Verified that PowerShell works normally outside Codex.
    • Verified that the project files are accessible outside Codex.
    • Checked repository ownership, which belongs to my normal Windows user.

    The problem persists after all these steps.

    No project files, ACL permissions, sandbox settings, or runtime binaries have been modified.

    This started occurring after updating Codex Desktop on October 9, 2026.

    It appears to match the runtime ACL validation/sharing violation described in this issue.

    Is there an official fix planned for an upcoming Windows Desktop release?

  4. OKhan99 commented on Oct 9, 2026

    @OKhan99

    I am facing same issue. what to do now? wait for openai team to look into it? what is the solution. all the work has been stopped.

  5. dacho73k commented on Oct 9, 2026

    @dacho73k

    I can confirm the same issue on Windows with Codex CLI 0.161.0 and 0.162.0.

    My diagnostics identified the following process chain:

    codex.exe (managed app-server 0.162.0) → node.exe (unified-computer-use/launch.mjs) → node_repl.exe

    The Windows sandbox repeatedly fails during ACL validation of the running node_repl.exe with os error 32.

    I also tested the following without success:

    • Full Windows restart
    • Downgrading CLI from 0.162.0 to 0.161.0
    • Terminating node_repl.exe
    • Terminating the managed app-server process tree
    • Running codex app-server daemon stop, which returned {"status":"stopped","backend":"pid"}

    The failure returns when using the normal Windows sandbox.

    Starting the CLI with codex -c "windows.sandbox=\"unelevated\"" allows shell commands to run.

    This appears to be a runtime lifecycle / sandbox ACL coordination issue rather than a project-specific problem. Please advise whether a fix that preserves the normal sandbox isolation is planned.

  6. wangtingyi61 commented on Oct 10, 2026

    @wangtingyi61

    Additional reproduction report — Windows Codex Desktop, October 9–10, 2026

    I am experiencing the same persistent Windows sandbox initialization failure.

    Actual behavior

    Every local command fails before the command process can start, including a minimal read-only PowerShell command:

    Get-Date

    Error:

    helper_unknown_error: setup refresh had errors
    

    The sandbox log consistently identifies the underlying failure:

    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
    

    The log also identifies the Codex sandbox setup helper under the binary directory 9691020b546a15b2.

    Troubleshooting already performed

    • Rebooted Windows.
    • Completely exited and reopened Codex Desktop.
    • Waited until other Codex tasks had finished.
    • Reproduced the error in a new, temporary conversation using only Get-Date.
    • Searched for node_repl.exe in Windows Resource Monitor's associated handles; no matching process or handle was found at the time of inspection.
    • Inspected the sandbox logs, which repeatedly showed the same os error 32.

    None of these steps resolved the issue. The exact process responsible for the sharing violation has not been identified.

    Impact on scheduled automations

    On October 10, three independent scheduled development tasks failed at their first execution attempt.

    All three reported the same sandbox initialization error and stopped immediately.

    As a result:

    • No project source code was inspected.
    • No planned data engineering, calculations, or automated browser tests were executed.
    • All three scheduled tasks produced zero completed test scenarios or data additions.
    • A full overnight development window was lost.

    This is particularly disruptive for users relying on Codex scheduled automations and unattended overnight development.

    Expected behavior

    Codex should initialize its sandbox and run authorized commands without being blocked by its own runtime executable or another file-sharing conflict.

    A failure should provide actionable diagnostics and, where safe, an automatic recovery mechanism.

    Request

    Could the maintainers please confirm:

    1. Whether a fix for this specific node_repl.exe / os error 32 issue is included in a released Windows desktop build.
    2. Which desktop app version contains the fix, if available.
    3. Whether there is a supported recovery procedure that preserves sandbox security and does not require disabling protections, deleting user data, or repeatedly rebooting Windows.

    I can provide additional sanitized logs if requested.

    Thank you.

  7. synapseeclipsestudios commented on Oct 12, 2026

    @synapseeclipsestudios

    Confirmed successful recovery on Windows 11

    I encountered the same problem:

    helper_unknown_error: setup refresh had errors

    Sandbox logs identified:

    node_repl.exe: The process cannot access the file because it is being used by another process. (os error 32)

    Diagnosis:

    Windows PowerShell worked normally outside Codex, and project files were accessible.

    Process inspection revealed two codex.exe processes and four node_repl.exe processes running from Codex's runtime directory.

    Recovery procedure:

    Completely exit the Codex desktop application.
    Open Windows PowerShell.
    Verify that all Codex runtime processes have stopped:
    Get-CimInstance Win32_Process |
    Where-Object {
    $.Name -in @('codex.exe','node_repl.exe','node.exe') -and
    $
    .ExecutablePath -like "$env:LOCALAPPDATA\OpenAI\Codex*"
    } |
    Select-Object Name,ProcessId
    Confirm that the command returns no processes.
    Reopen Codex.
    Test execution with Get-Location.

    Result: SUCCESS

    Get-Location executed successfully after restarting Codex with no remaining runtime processes.

    Project access and Git verification also succeeded.

    No reinstall, runtime deletion, Windows permission changes, or sandbox security changes were necessary.

    Important: This is a confirmed workaround on one installation, not a universal or permanent fix. The underlying runtime file-locking issue still needs investigation.

  8. dacho73k commented on Oct 13, 2026

    @dacho73k

    I can confirm the same issue on Windows with Codex CLI 0.161.0 and 0.162.0.

    My diagnostics identified the following process chain:

    codex.exe (managed app-server 0.162.0) → node.exe (unified-computer-use/launch.mjs) → node_repl.exe

    The Windows sandbox repeatedly fails during ACL validation of the running node_repl.exe with os error 32.

    I also tested the following without success:

    • Full Windows restart
    • Downgrading CLI from 0.162.0 to 0.161.0
    • Terminating node_repl.exe
    • Terminating the managed app-server process tree
    • Running codex app-server daemon stop, which returned {"status":"stopped","backend":"pid"}

    The failure returns when using the normal Windows sandbox.

    Starting the CLI with codex -c "windows.sandbox=\"unelevated\"" allows shell commands to run.

    This appears to be a runtime lifecycle / sandbox ACL coordination issue rather than a project-specific problem. Please advise whether a fix that preserves the normal sandbox isolation is planned.

    Additional diagnostic information:

    Using Microsoft Sysinternals Process Explorer, I confirmed two running node_repl.exe processes (PIDs 28996 and 29948), both with the exact executable loaded from:

    C:\Users\<USER>\AppData\Local\OpenAI\Codex\runtimes\cua_node\cfb32733c877621e\bin\node_repl.exe

    Process Explorer lists both as loaded modules (Type: DLL).

    The sandbox fails when trying to update the file's ACL, reporting os error 32 (sharing violation).

    Both supported kernel resets (mcp__node_repl__js_reset and mcp__cua_repl.js_reset) completed successfully but did not resolve the issue.

    Codex CLI 0.162.1 is also affected.

    This confirms that the executable is loaded by two running processes, although the exact blocking file handle has not been independently identified.

    Image
  9. jersabangan78-prog commented on Oct 13, 2026

    @jersabangan78-prog

    I can confirm the same issue on Windows 10 Pro (64-bit) with Codex CLI v0.162.1.

    Observed error:

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

    Even the basic Get-Location command fails before execution.

    Diagnostic findings:

    • Codex Doctor: 24 checks passed, 1 failed.
    • Failed check: elevated Windows sandbox provisioning.
    • Sandbox log: runtime read/execute validation of node_repl.exe fails with Windows sharing violation (OS error 32).

    Troubleshooting already performed:

    • Restarted Windows.
    • Inspected and stopped identified Codex background processes.
    • Reinstalled Codex using npm.cmd install -g @openai/codex@latest.
    • Retested using codex.cmd --no-daemon --sandbox read-only.

    The problem persists. Authentication, configuration, and connectivity checks pass.

    Could the maintainers advise a supported fix that preserves existing Codex sessions, configuration, and Windows sandbox protections?

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