Skip to content

Windows elevated sandbox fails on live runtime ACL refresh; unelevated restores execution #52427

Open

Description

@newhouse-ss

What version of the Codex App are you using?

Affected installed MSIX: OpenAI.Codex_26.1002.7124.0_x64 (package status Ok).
Bundled CLI: codex-cli 0.162.0-alpha.2.
The original affected chat also used a separately installed shared app-server daemon, version 0.162.0. These are distinct components; the daemon version is not the bundled CLI version.

What subscription do you have?

Not collected. No account or billing details are included.

What platform is your computer?

Windows 11 Pro Education, x64, build 26100.
PowerShell reported Microsoft Windows NT 10.0.26100.0.
Observed and workaround rechecked on October 9, 2026.

What issue are you seeing?

The elevated Windows sandbox fails before ordinary PowerShell commands can execute. Switching to unelevated temporarily restores command execution, but users should be able to retain the elevated sandbox and its stronger isolation.

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

Sanitized fatal setup log:

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

Exiting and reopening the client did not provide lasting recovery. The shared daemon remained running, and new chats started new node_repl.exe processes. Stopping the affected helper processes restored elevated sandbox execution briefly, but it failed again when the runtime processes returned.

A controlled check also reproduced this: with the runtime helper stopped, a fresh elevated sandbox command succeeded and setup logged errors=[]. Running the same helper executable as a temporary process made the next sandbox command fail before execution. This establishes a live-runtime conflict on this installation, not the exact conflicting handle or source-level root cause.

What steps can reproduce the bug?

On the affected existing installation:

  1. Set the user configuration to:

    [windows]
    sandbox = "elevated"
  2. Open or resume a chat with the Codex runtime helpers running.

  3. Ask the agent to run a minimal command such as Write-Output 'sandbox-ok'.

  4. Observe the setup/refresh error before PowerShell starts. Inspect the sanitized setup error for the live node_repl.exe target and Win32 error 32.

This was reproduced on an existing installation. Clean-install reproduction has not been established.

What is the expected behavior?

With [windows] sandbox = "elevated", ordinary PowerShell commands and file patch operations should work while legitimate Codex runtime processes and their libraries are loaded. Runtime permission validation should not reject an already-running executable merely because it is in use.

Additional information

Validated temporary workaround on this machine

approval_policy = "on-request"

[windows]
sandbox = "unelevated"

After switching to unelevated, the following checks passed in this chat without requesting require_escalated:

  • Get-Date returned the local date/time.
  • Subsequent ordinary PowerShell commands succeeded.
  • Built-in apply_patch created, modified, and deleted a temporary file.
  • Reading the modified content succeeded, and cleanup was confirmed.

This is a temporary compatibility workaround with weaker isolation. Approval prompts remain enabled. It is not a fix for elevated mode.

A separate Windows 11 Enterprise 23H2 report supplied alongside this case describes recovery with both sandbox = "unelevated" and launching the desktop app with --disable-gpu. That GPU change may address a separate UI closing/hanging problem. The GPU flag was not independently verified on this machine, and these combined changes should not be attributed to a single cause.

Investigation request and related report

Related: #51596 . This issue adds an independently affected installation and locally verified command/patch recovery under unelevated.

The related investigation reports that opening the same live runtime file with MAXIMUM_ALLOWED failed with error 32, while READ_CONTROL and READ_CONTROL | WRITE_DAC succeeded with otherwise matching open parameters. Those native API checks were performed on another machine, not this one.

Please investigate whether MAXIMUM_ALLOWED is necessary for the root-only ACL validation/update path, particularly when the file already grants the sandbox group read/execute access. Consider requesting only the access rights needed for the actual check or update. This is an investigation proposal, not a verified source patch.

Requested acceptance criteria

  • Elevated sandbox startup succeeds on an affected existing Windows installation while node_repl.exe and runtime DLLs are loaded.
  • Ordinary commands and apply_patch creation, modification, reading, and deletion succeed in elevated mode.
  • Recovery persists across new chats and client restarts with the runtime helpers active.
  • Regression coverage checks already-correct ACLs on live runtime files and any required ACL updates.
  • A remaining setup failure exposes the actual target and Win32 error instead of only helper_unknown_error.

Personal paths, project contents, credentials, session IDs, and full raw logs are omitted.

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