Skip to content

Windows sandbox setup fails with file-sharing errors on bundled computer-use runtime, blocking all shell commands #52036

Open

Description

@ChrisAtOnRobot

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

26.1002.7124.0

What subscription do you have?

Business

What platform is your computer?

Windows, x64

What issue are you seeing?

Local shell commands fail before execution, including simple read-only commands to list a folder. The returned error is:

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

The sandbox logs show Windows sharing violations (os error 32) while validating read/execute access to files in Codex’s bundled cua_node runtime.

Two different files have blocked setup during troubleshooting:

node_repl.exe

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

VCRUNTIME140_1.dll

runtime read/execute validation failed: validate runtime read/execute access on C:\Users\AppData\Local\OpenAI\Codex\runtimes\cua_node\3dd31cfff853001c\bin\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)

Inspecting loaded modules identified codex-computer-use-swift as using the DLL. Its parent process was ChatGPT.exe from the OpenAI.Codex desktop package. After stopping the helper, it returned with a new process ID.

Browser automation also failed to initialize. External PowerShell remained usable.

What steps can reproduce the bug?

Feedback ID: 01a11aad-a0ce-7a43-98a0-9dbe147f44e9

In the affected desktop session:

Ask Codex to list a local directory using a read-only PowerShell command.

The command fails before starting with helper_unknown_error.

Inspect .codex.sandbox\sandbox.2026-10-08.log.

The log reports runtime read/execute validation failures with os error 32.

Troubleshooting performed:

Fully quit and reopened the desktop app.

Restarted Windows.

Stopped the running node_repl.exe helpers.

Stopped codex-computer-use-swift after identifying it as using the DLL.

Disabled Computer Use under Settings → Computer use, then restarted the app.

Stopped remaining node_repl.exe helpers while Computer Use was disabled.

Re-enabled Computer Use and retried.

None of these steps restored local shell access. The blocking file alternated between node_repl.exe and VCRUNTIME140_1.dll. It is not yet known whether this reproduces in a fresh chat or on another machine.

What is the expected behavior?

Read-only local shell commands should execute successfully. Sandbox setup should handle bundled runtime files that are already in use, or coordinate helper startup so permission validation can complete.

If setup cannot complete, the app should surface the specific underlying error and an actionable recovery step rather than only helper_unknown_error.

Activity

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

    @crimsonsunset17171

    Adding evidence from an independent repro that I think narrows this down, and that answers
    the two open questions in the report above ("whether this reproduces in a fresh chat" and
    "the process responsible for the conflicting file access / startup-order race").

    Environment: Windows 11 10.0.26200 x64 (zh-CN), Codex desktop 26.1002.7124.0,
    bundled CLI 0.162.0-alpha.2, [windows] sandbox = "elevated".


    1. Provisioning succeeds when Codex is not running — the setup logic itself is fine

    With every Codex process stopped (ChatGPT, codex, codex-computer-use-swift,
    node_repl), the runtime tree had 0 files held open, and the sandbox actually worked:

    $ codex sandbox cmd /c "echo provision-probe"
    provision-probe        # exit 0
    

    The elevated setup command also completes, and I watched it rewrite the marker:

    $ codex sandbox setup --elevated --current-user      # elevated shell, Codex stopped
    Windows elevated sandbox setup completed for <USER> at C:\Users\<USER>\.codex.
    

    setup_marker.json before → after:

    // before — stale, dated months earlier, empty roots
    { "version": 5, "created_at": "2026-03-18T07:59:13Z", "read_roots": [], "write_roots": [] }
    
    // after
    { "version": 5,
      "created_at": "2026-10-08T12:14:48Z",
      "proxy_ports": [], "allow_local_binding": false,
      "read_roots": [], "write_roots": [] }

    But the fix does not survive a relaunch. Once Codex starts, codex-computer-use-swift
    and node_repl load their files again and the very next sandboxed command fails with the
    identical helper_unknown_error. This is consistent with the setup being designed to run
    before Codex starts, while the per-command refresh runs after.

    2. The refresh writes unconditionally — it is not an "ACL is missing" problem

    I pre-granted the ACEs the setup appears to want, to all 35 executables/DLLs under
    runtimes\, verified as non-inherited:

    # per file, no (OI)(CI) → explicit, non-inherited
    icacls <file> /grant "CodexSandboxOffline:(RX)" "CodexSandboxOnline:(RX)"
    # (Get-Acl).Access → CodexSandboxOffline / CodexSandboxOnline, IsInherited = False

    The next codex sandbox still failed, on node_repl.exe. That rules out "the ACE is
    absent or carries the wrong mask" and points at the ACL write itself being attempted on
    every refresh.

    One detail that may help: icacls can modify the ACL of a file that is currently
    loaded — it succeeded on all five locked files — while codex-windows-sandbox-setup.exe
    cannot. That suggests the setup opens the target with a wider access mask than an ACL
    update requires, which is what makes the sharing violation fatal for it but not for
    icacls.

    3. The blocker set, and the fact that Codex restores it

    Exactly five files are held, by two auto-respawned processes:

    runtimes\cua_node\3dd31cfff853001c\bin\node_repl.exe
        -> held by  node_repl        (the node_repl MCP server)
    
    runtimes\cua_node\3dd31cfff853001c\bin\node_modules\@oai\sky\bin\windows\swift\x64\
        codex-computer-use-swift.exe
        MSVCP140.dll
        VCRUNTIME140.dll
        VCRUNTIME140_1.dll
        -> held by  codex-computer-use-swift
    

    Two behaviours that make this unrecoverable from the user side:

    • Killing a holder moves the failure to the next locked file
      (node_repl.exe → VCRUNTIME140_1.dll), confirming the mechanism. Both processes are
      respawned within a few seconds of being killed.
    • Moving the swift directory out of the runtime tree does not help — Codex
      re-materializes it. Renaming it in place does not help either, since the refresh walks
      the whole subtree recursively.

    Disabling Computer Use plus the node_repl MCP server does clear the locks, but that is
    giving up features to work around a bug.

    4. codex doctor

    ✗ sandbox      elevated Windows sandbox provisioning recorded a structured failure
          sandbox backend          elevated
          sandbox provisioning     failed
          error code               helper_unknown_error
        → repair or reinstall the Codex CLI from an approved distribution
    

    "Repair or reinstall" does not help here: the failure is reproduced immediately after a
    fresh elevated setup on a healthy install.

    Suggested direction

    • Skip the ACL write when the mask is already satisfied, and/or treat a sharing violation
      on an already-correct file as non-fatal instead of aborting the whole refresh.
    • Failing that, the binary already carries restricted-token and legacy Windows sandbox
      variants — if either avoids the per-command ACL pass, exposing one as an escape hatch
      would unblock affected users immediately.

    Happy to provide the full sandbox.<date>.log excerpts or re-test a build with a fix.

  4. ChrisAtOnRobot commented on Oct 8, 2026

    @ChrisAtOnRobot
    Author

    Confirmed workaround in my Windows desktop environment:

    Change %USERPROFILE%\.codex\config.toml to:

    [windows]
    sandbox = "unelevated"

    Then fully quit and reopen the Codex desktop app. Editing the configuration without restarting was insufficient.

    My troubleshooting also matches the independent reproduction above: after terminating node_repl.exe, the elevated sandbox failure moved to VCRUNTIME140_1.dll, which was loaded by codex-computer-use-swift. The helper processes subsequently returned. App restarts and toggling Computer Use did not resolve the elevated setup failure.

    The additional evidence suggests the problem lies in the runtime ACL refresh interacting with running helpers. In particular, the successful icacls updates suggest that the sharing violation depends on how the setup helper opens the files, rather than Windows universally preventing ACL changes on loaded executables. I have not independently tested the ACL pre-grant procedure.

    After switching to unelevated mode and restarting, I verified:

    • Local commands execute successfully.
    • A local CSV and an existing uploaded attachment can be read.
    • In-app browser automation opens and reads a GitHub page.
    • Local commands still work after browser automation initializes.

    This confirms a working fallback in my environment, not a fix for the elevated backend. Unelevated mode has weaker isolation and lacks elevated-only features such as managed networking and deny-read overrides. Fresh attachment uploads have not been tested.

  5. alanecz94 commented on Oct 8, 2026

    @alanecz94

    I can reproduce this on Windows 10 Home, build 19045.

    Normal local commands fail before execution with helper_unknown_error: setup refresh had errors. Sandbox logs show os error 32 while validating ACL access to node_repl.exe; during troubleshooting, the blocking file also changed to the computer-use runtime's VCRUNTIME140_1.dll.

    Restarting Windows, repairing the app through Windows Settings, and stopping the identified runtime helpers did not restore normal execution. The computer-use helper restarted automatically. An external codex sandbox --permission-profile :workspace test with the app closed returned SANDBOX_OK, but the next in-app command failed again. Approved require_escalated commands work; browser automation still fails to initialize.

    The app updater reports version 26.1002.52244, build 13536, production channel, and up_to_date. The running Windows package path contains 26.1002.7124.0.

    Could you confirm when the fix in PR #51822 will be available in the Windows desktop build? We have kept workspace-write and windows.sandbox = "elevated"; no sandbox downgrade or Windows execution-policy changes were applied.

  6. bhazelwood1968 commented on Oct 8, 2026

    @bhazelwood1968

    Additional evidence from #52257, which I am consolidating into this issue:

    • Windows 11 Enterprise build 26200; Codex package 26.1002.7124.0; CLI 0.159.0; elevated sandbox; cua_node runtime 3dd31cfff853001c.
    • Windows Application events show sandbox service running (ID 1000, 15:58:20) and sandbox provisioning completed successfully (ID 2000, 15:59:56), but the later filesystem setup refresh fails on VCRUNTIME140_1.dll with sharing violation (os error 32), then exits 1 at 16:03:41.
    • ProcMon recorded codex-windows-sandbox-setup.exe CreateFile -> SHARING VIOLATION against that DLL (Desired Access includes Maximum Allowed).
    • During the "Finishing Windows setup" screen, codex-computer-use-swift.exe (PID 18920) is already running as a direct child of packaged ChatGPT.exe (PID 10468). Process Explorer confirmed Swift loaded the identical runtime DLL. The exact incompatible handle remains unproven.
    • Reproduced after reboot, complete reinstall, fresh .codex with no restored history/settings, regenerated runtime, and disabling the Edge ChatGPT extension. Both Codex and ChatGPT Work fail while normal Chat works. A colleague's workstation with the same Windows build, package version, runtime ID, and elevated setting works.
    • Separate cleanup symptom: Windows sandbox service event 1003 on uninstall: "remove desktop-created codex home: failed, Access is denied. (os error 5)". Disabling the Edge extension released its lock on .codex, allowing rename, but did not fix the DLL sharing violation after reinstall.

    Distinct takeaway: Windows sandbox provisioning succeeds, but subsequent ACL refresh fails against a DLL already loaded by the desktop-launched CUA process. Please consider access-mask behavior and coordination of helper startup with ACL validation. Closing #52257 as a duplicate of #52036.

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