Skip to content

Windows: setup refresh fails (helper_unknown_error) because node_repl.exe in cua_node runtime is locked by Codex's own process (os error 32) #51862

Open

Description

@MOTOKI-LLC

App: ChatGPT/Codex Desktop for Windows, displayed version 26.1002.51308 (package OpenAI.Codex_26.1002.6548.0_x64)
OS: Windows (mini PC). macOS works fine.
Diagnostic session ID: 01a11859-5688-77c6-8874-d7aee74130ab

Symptom:
Every command (even read-only Get-Location) fails before execution:
"exec_command failed: CreateProcess ... helper_unknown_error: setup refresh had errors"

Findings from %USERPROFILE%.codex.sandbox\sandbox.2026-10-07.log:

  • The only entry in refresh errors is:
    runtime read/execute validation failed: validate runtime read/execute access on
    C:\Users<user>\AppData\Local\OpenAI\Codex\runtimes\cua_node\2c9e75c4e9c71beb\bin\node_repl.exe:
    open ACL target for root-only update: (os error 32 - sharing violation)
  • Write roots are granted successfully; the user-profile ACE also fails with os error 32 but setup continues.
  • The cua_node runtime folder was created 2026-10-07 14:29:47 JST; refresh failures start 14:30:55 JST and repeat on every command since. node_repl.exe never appears in earlier logs (up to 2026-10-05), when Windows sessions worked.
  • node_repl.exe is running with process chain: codex.exe (Codex\bin\979a96ce184041d1) -> node.exe (cua_node) -> node_repl.exe.
    So the file appears to be locked by Codex's own runtime while the sandbox setup tries to open it for an ACL update.

Expected: setup refresh should not fail on a runtime file held open by Codex itself (or should open it with a compatible share mode).
No local settings, ACLs, or files were modified.

Activity

  1. added
    bug
    app
    windows-os
    sandbox
    on Oct 7, 2026
  2. MOTOKI-LLC commented on Oct 7, 2026

    @MOTOKI-LLC
    Author

    Duplicate of #51601

  3. 123ms-svg commented on Oct 8, 2026

    @123ms-svg

    I can reproduce the same symptoms on Windows 11 Home (10.0.26200), Codex desktop 26.1002.7124.0 (bundled codex-cli 0.160.1).

    After updating from 26.930.7945.0, every shell command failed before PowerShell started with helper_unknown_error: setup refresh had errors. The sandbox log reports runtime read/execute validation failed for ...\Codex\runtimes\cua_node\<runtime>\bin\node_repl.exe, followed by open ACL target for root-only update: os error 32 and setup exiting with status 1.

    Restarting Windows, fully restarting the app, and terminating node_repl.exe did not resolve it. Disabling the node_repl MCP entry in config.toml did not persist after the app restarted.

    Changing [windows] sandbox from "elevated" to "unelevated" allowed Get-Date to execute successfully from a cloud-controlled laptop task. This is a temporary workaround with weaker isolation, not confirmation that the underlying issue is fixed. I would like to return to elevated mode once a fix is available.

  4. Lunariz commented on Oct 8, 2026

    @Lunariz

    Encountering the same issue since an update yesterday, and can confirm that rebooting, changing project settings, or recreating the cua_node runtime did not fix the issue.

    As noted above, only setting the sandbox to unelevated was able to work around this issue.

  5. giunapmicrotec commented on Oct 8, 2026

    @giunapmicrotec

    Codex 26.1002.52244
    I'm wasting time and losing my smile: the browser control is down, and the sandbox isn't available!

    Any idea on the resolution time?

    bye

  6. onpdm commented on Oct 8, 2026

    @onpdm

    I can reproduce the same issue on Windows 10.

    Environment:

    • Windows 10 Home 22H2 / build 19045 x64
    • ChatGPT/Codex desktop package: 26.1002.7124.0
    • Codex CLI: 0.161.0
    • Windows elevated sandbox
    • Runtime:
      %LOCALAPPDATA%\OpenAI\Codex\runtimes\cua_node\3dd31cfff853001c

    Observed error:

    helper_unknown_error: setup refresh had errors

    Sandbox log:

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

    Additional reproduction / workaround:

    1. Close the ChatGPT/Codex desktop app.
    2. Kill:
      • node_repl.exe
      • node.exe
      • codex-code-mode-host.exe
    3. Run a simple Codex command such as pwd.
    4. The command succeeds.
    5. Switching to another Codex chat/session starts node_repl.exe / node.exe again.
    6. The next sandbox refresh fails again with the same os error 32.
    7. This also reproduces when using the Codex CLI without the Windows desktop app.

    Example processes observed immediately before failure:

    • codex.exe
    • node_repl.exe (multiple instances)
    • node.exe (multiple instances)
    • codex-code-mode-host.exe

    All node/node_repl processes were running from the exact cua_node runtime directory that sandbox setup subsequently tried to validate.

    I also tested:

    • updating Codex CLI from 0.153.4 to 0.161.0
    • reinstalling/restarting the Windows desktop app
    • rebooting Windows
    • Microsoft Defender exclusion for the Codex installation directory
    • regenerating the entire cua_node runtime directory

    None fixed the issue.

    Regenerating the runtime is especially noteworthy:
    the runtime directory was recreated successfully, but as soon as Codex started node_repl.exe from the freshly generated runtime, the next sandbox refresh failed again with os error 32.

    This makes it appear that the sandbox ACL refresh is racing with / trying to open a runtime executable already held open by Codex itself.

  7. fedechiesa commented on Oct 8, 2026

    @fedechiesa

    I'm experiencing the same issue on Windows with both the Codex VS Code extension and the Codex Desktop app.

    Local command execution fails before PowerShell or CMD can start, even for simple commands like Get-Location.

    Error:
    helper_unknown_error: setup refresh had errors

    The sandbox log consistently reports:
    runtime read/execute validation failed on cua_node/.../bin/node_repl.exe, followed by os error 32 (file in use).

    Troubleshooting attempted:

    • Restarted VS Code and Codex Desktop.
    • Rebooted Windows.
    • Tried new Codex conversations and different repositories.
    • Reinstalled Codex Desktop.
    • Renamed the local runtimes directory to force regeneration.
    • Disabled the VS Code extension.
    • Changed the ownership of one project folder.

    None of these resolved the issue. PowerShell works normally outside Codex.

    The problem appeared today, October 8, 2026. Codex can still answer general questions, but it cannot access local project files or execute commands.

    This completely blocks my local development workflow. I'm a paying Plus subscriber and would appreciate a supported workaround or an ETA for a fix.

  8. astrolab commented on Oct 8, 2026

    @astrolab

    I'm experiencing the same "helper_unknown_error: setup refresh had errors" problem with Codex on Windows 11.

    I spent quite a few hours troubleshooting this including examining Codex logs and using Microsoft's Process Monitor and Process Explorer.

    What I found:

    • The sandbox logs showed runtime read/execute validation failed on node_repl.exe, with Windows os error 32 (file being used by another process).
    • Process Explorer showed that Codex was launching two node_repl.exe processes.
    • Restarting the Codex Sandbox Service didn't resolve the problem.
    • Even a simple command like Write-Output 'HELLO' failed before PowerShell could start.
    • Ordinary PowerShell worked perfectly outside Codex.

    The workaround that worked for me:

    First, I changed my ~/.codex/config.toml file to:

    toml
    [windows]
    sandbox = "unelevated"

    This allowed Codex CLI to execute PowerShell commands, where before it couldn't.

    To continue working, I gave up on the ChatGPT/Codex app and launched Codex CLI using:

    powershell
    codex --no-daemon --model gpt-6-luna --sandbox danger-full-access

    Current status:

    I'm successfully using the CLI as a workaround and have returned to my work. However, the Codex Windows desktop GUI still closes a few seconds after signing into my primary ChatGPT account. The unelevated setting did not resolve that issue.

    All my threads and work in progress convo's inside the GUI are inaccessible. MD files on in the folders helped for continuity but, still a major hassle with the app simply not working.

    Ironically, I upped my sub to Pro yesterday 😭

  9. Hendra827 commented on Oct 9, 2026

    @Hendra827

    I'm affected by the same Windows sandbox failure (helper_unknown_error: setup refresh had errors, OS error 32 on cua_node/.../node_repl.exe). Please prioritize shipping and confirming the Windows Desktop build that includes the fix from #51822.

    The reported workaround of setting [windows] sandbox = "unelevated" in ~/.codex/config.toml appears to let commands run again, but it weakens isolation and should be treated as temporary. Please confirm the supported workaround and the Desktop release/build containing the fix so affected users can safely return to the elevated sandbox.

  10. Hendra827 commented on Oct 9, 2026

    @Hendra827

    I'm affected by the same Windows sandbox failure (helper_unknown_error: setup refresh had errors, OS error 32 on cua_node/.../node_repl.exe). Please prioritize shipping and confirming the Windows Desktop build that includes the fix from #51822.

    The reported workaround of setting [windows] sandbox = "unelevated" in ~/.codex/config.toml appears to let commands run again, but it weakens isolation and should be treated as temporary. Please confirm the supported workaround and the Desktop release/build containing the fix so affected users can safely return to the elevated sandbox.

  11. Hendra827 commented on Oct 9, 2026

    @Hendra827

    Following up on the Windows OS error 32 reports: PR #51822 appears to address the ACL/sharing-violation path, but affected Codex Desktop users still need confirmation of the first Desktop build that includes it.

    Could the team confirm whether this fix has been integrated and validated in the Windows Desktop app, and share the expected version/build or rollout window? If the Desktop rollout is separate from the CLI release, please clarify that as well. The unelevated setting reported in this thread is only a workaround because it reduces sandbox isolation.

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