codex icon indicating copy to clipboard operation
codex copied to clipboard

Windows app 26.1002.51308: sandbox setup fails with sharing violation when validating its own active runtime

Open yuichitanaka51-cyber opened this issue 1 month ago • 126 comments

Title: Windows app 26.1002.51308: sandbox setup fails with sharing violation when validating its own active runtime

Summary

After updating the Windows Codex app to 26.1002.51308 (build 13417), all command execution fails before the requested command starts:

helper_unknown_error: setup refresh had errors

Node REPL also fails:

trusted Node process exited unexpectedly

Sandbox logs show that runtime ACL validation attempts to open files currently used by Codex itself and fails with Windows error 32 (ERROR_SHARING_VIOLATION).

Environment

  • OS: Windows
  • Codex app: 26.1002.51308, build 13417
  • Windows sandbox: elevated
  • Previous helper directory: Codex\bin\5ea220ae823df3d7
  • Previous command-runner version: 0.160.1
  • Current helper directory: Codex\bin\979a96ce184041d1
  • Current runtime: cua_node\2c9e75c4e9c71beb

Expected behavior

Sandbox setup should complete while Codex's own runtime processes are running. Commands and Node REPL should start normally.

Actual behavior

Every command fails during sandbox setup refresh. The relevant log entry 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: The process cannot access the file because it is being used by another process. (os error 32)

After stopping the two node_repl.exe processes during an earlier diagnostic test, validation passed that file but failed with the same error on:

...\bin\node_modules\@oai\sky\bin\windows\swift\x64\VCRUNTIME140_1.dll

Stopping those processes did not resolve the issue.

Regression evidence

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

  • Previous helper: 50 successful setup refreshes, no failures.
  • Current helper: 13 failed setup refreshes, no successes.
  • Latest recorded failure: October 7, 2026, 15:05 JST.
  • Logs from October 6 and earlier contain no runtime read/execute validation entries.

Both restarting the app and rebooting Windows failed to resolve the problem. No newer app update was available when checked.

Diagnostic findings

  • There is only one runtime under runtimes: cua_node\2c9e75c4e9c71beb.
  • There are no old runtime directories or .staging-* directories.
  • Therefore, the stale-runtime workaround described in #44696 does not apply here.
  • Processes using the affected runtime include Codex's own node_repl.exe, node.exe, and codex-computer-use-swift.exe.
  • Read and execute permissions for the sandbox group are already present.
  • The earlier, separate error 5 / helper_sandbox_lock_failed issue has been resolved.
  • A separate error 32 involving C:\Users\<USER> is followed by continuing setup; it is not the fatal failure described above.

The latest investigation was read-only. No files, configuration, or permissions were changed.

Suspected cause — not confirmed

Based on the public openai/codex main branch inspected on October 7, 2026:

In codex-rs/windows-sandbox-rs/src/acl.rs, ensure_allow_mask_aces_with_inheritance_impl opens a target with OpenOptions and access_mode(MAXIMUM_ALLOWED) when inheritance == 0, using the context:

open ACL target for root-only update

In setup_provisioning/setup_runtime_bin.rs, ensure_runtime_tree_readable calls grant_read_execute_aces(..., 0) for files throughout the runtime tree.

My hypothesis is that requesting MAXIMUM_ALLOWED may include write access when opening running executables or loaded DLLs, causing a sharing violation. That validation error then causes the entire setup refresh to fail, blocking all command execution.

This is an inference from the logs and public source, not a confirmed root cause. I have not verified that the public main branch exactly matches the installed app build.

Possible fix directions

Please consider whether ACL inspection can open targets with READ_CONTROL only, requesting WRITE_DAC separately only when an ACL change is actually needed.

It may also be worth reviewing how validation handles files already in use by Codex. Any handling of sharing violations should preserve the required sandbox access checks rather than simply bypassing them.

Related issue

#44696 reports runtime validation failures, but its stale-runtime workaround does not match this environment.

yuichitanaka51-cyber avatar Oct 07 '26 06:10 yuichitanaka51-cyber

Potential duplicates detected. Please review them and close your issue if it is a duplicate.

  • #51590
  • #51596

Powered by Codex Action

github-actions[bot] avatar Oct 07 '26 06:10 github-actions[bot]

Seeing the same failure with the same helper and runtime on another Windows installation.

  • Installed package: OpenAI.Codex_26.1002.6548.0_x64__2p2nqsd0c76g0
  • Helper: %LOCALAPPDATA%\OpenAI\Codex\bin\979a96ce184041d1
  • Runtime: %LOCALAPPDATA%\OpenAI\Codex\runtimes\cua_node\2c9e75c4e9c71beb

A normal delegated PowerShell Get-Location fails before process creation with: exec-server rejected request (-32603): helper_unknown_error: setup refresh had errors.

The sandbox log at 2026-10-07 06:35:28 UTC reports runtime read/execute validation failing on the runtime's bin\node_repl.exe, with "open ACL target for root-only update" and "The process cannot access the file because it is being used by another process. (os error 32)". Earlier attempts reported the same error on bin\node_modules@oai\sky\bin\windows\swift\x64\VCRUNTIME140_1.dll.

Recovery attempts:

  • A fresh thread still failed.
  • Fully exited the app, confirmed the old node_repl/node/codex processes were gone, and reopened it. New helper processes started, but execution still failed.
  • After a full Windows reboot, Get-Location still failed at approximately 06:41 UTC with the same generic setup error. I have not re-read the detailed sandbox log after that reboot, so cannot confirm the post-reboot failing file.

No manual ACL, cache, or security-setting changes were made for the recovery attempts listed above. The root cause remains unconfirmed.

Update: After backing up the configuration, setting windows.sandbox to "unelevated", and restarting the app, the same existing delegated thread ran Get-Location normally (exit 0, expected working directory). A read-only check confirmed the configured setting and matching backup. This restored basic command execution through the configured fallback; the elevated-sandbox failure remains unresolved. The effective runtime implementation was not exposed by the check.

MazDragon avatar Oct 07 '26 06:10 MazDragon

Additional reproduction and controlled access-mask comparison on Windows 11 Pro x64 (10.0.26200), reported with the affected user's explicit authorization

Environment and impact

  • Desktop app reports version 26.1002.51308, build 13417, prod channel
  • Windows package version is 26.1002.6548.0
  • Bundled CLI is 0.162.0-alpha.2
  • Configured Windows sandbox remains elevated
  • Bundled Node binary reports v24.21.0
  • Browser Use and Computer Use cannot initialize, and ordinary sandboxed shell commands fail before execution
  • The workflow requires access to existing authenticated browser tabs, so an unrelated standalone shell working is not sufficient recovery

Update correlation

Windows deployment logs show the package updating from 26.930.7945.0 to 26.1002.6548.0 on 2026-10-07 at approximately 08:22–08:28 Europe/Moscow Previous sandbox logs show successful setup with command runner 0.160.1; subsequent logs show the current helper failing This is evidence of a regression correlation, not a debugger-level match of the installed helper to source

Failure

The fatal setup error is associated with the active runtime file:

%LOCALAPPDATA%\OpenAI\Codex\runtimes\cua_node\<runtime-id>\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)
helper_unknown_error: setup refresh had errors

After an explicitly authorized termination of the existing Node REPL processes, validation instead failed on the same runtime's Computer Use VCRUNTIME140_1.dll Stopping helpers did not provide durable recovery; restarting the app did not restore operation The runtime directory currently contains one runtime version, with no stale staging directory observed

Non-mutating Win32 comparison

Against the same active node_repl.exe, two rounds of CreateFileW probes produced:

Desired access Result
MAXIMUM_ALLOWED (0x02000000) Error 32
READ_CONTROL (0x00020000) Success
READ_CONTROL + WRITE_DAC (0x00060000) Success

All other arguments were identical: share read/write/delete (7), OPEN_EXISTING (3), FILE_FLAG_BACKUP_SEMANTICS (0x02000000), null security/template arguments Handles were immediately closed; no file contents or ACLs were changed The file's security descriptor was checked before/after and was unchanged Ten matching Node REPL processes were still present during the latest comparison

These probes ran in a separately approved diagnostic shell outside the failing sandbox They establish the access-mask-dependent open failure, not successful end-to-end execution of a repaired elevated sandbox

Scope of suspected fix

The public change #49690 intentionally uses MAXIMUM_ALLOWED for non-inheriting ACL updates to preserve child permissions We are not proposing blindly removing that behavior or bypassing validation Please investigate whether inspection of active EXE/DLL targets can use READ_CONTROL first and request ACL changes only when required, while retaining the intended directory inheritance guarantees

A separate one-off unelevated diagnostic launched Node successfully, while the elevated equivalent failed The persistent configuration has not been changed, no runtime/helper binaries have been replaced, and no manual ACL changes have been made A separate official 0.160.1 comparison is planned but has NOT yet been performed on this installation

Requested outcome

Please prioritize a supported recovery that restores ordinary commands and Browser Use / Computer Use while retaining elevated isolation

Preferred: a fixed desktop/helper build with regression coverage for active bundled EXE/DLL files and preserved child ACLs Alternative: guidance on whether an official stable CLI can be used independently with the existing browser/computer-use integration, without replacing signed desktop components

Please identify the fixed version when available, or confirm the supported interim procedure and its limitations No credentials, browser contents, private project URLs, personal paths, raw logs, or chat transcripts are included in this comment

KazxMartin avatar Oct 07 '26 07:10 KazxMartin

Additional affected installation: all business and development work blocked for approximately two hours

I am reporting another affected Windows desktop installation. The user explicitly authorized this report and states that their entire business and development workflow has been effectively paralyzed for approximately two hours. This includes day-to-day business operations, signed-in Chrome workflows, advertising and sales management, software implementation, and verification. Please treat this as an ongoing operational blocker.

Existing chat messages can still be sent, but Browser/Computer Use cannot initialize and normal sandboxed local commands fail before execution. Separately approved outside-sandbox diagnostic commands work; they do not restore the user's normal browser and development workflow.

Reproduction and error

On this affected installation, calling the documented Browser Use entry point await cua.getState(); fails before browser inventory or any Chrome page can be returned:

node_repl kernel exited unexpectedly
kernel_status: exited(code=1)
windows sandbox failed: helper_unknown_error: setup refresh had errors

The fatal sandbox log identifies:

runtime read/execute validation failed:
validate runtime read/execute access on
%LOCALAPPDATA%\OpenAI\Codex\runtimes\cua_node\<runtime-id>\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)

After specifically approved helper termination, validation progressed to the same sharing violation on @oai\sky\bin\windows\swift\x64\VCRUNTIME140_1.dll. The desktop app immediately relaunched its computer-use helper after that helper was separately approved for termination. A subsequent full desktop app restart again reproduced the node_repl.exe validation failure.

New controlled access-mode evidence

Without changing file contents or ACLs, we opened and immediately closed handles for the active node_repl.exe and VCRUNTIME140_1.dll. Both tests used FILE_SHARE_READ | FILE_SHARE_WRITE | FILE_SHARE_DELETE, OPEN_EXISTING, and FILE_FLAG_BACKUP_SEMANTICS:

File READ_CONTROL MAXIMUM_ALLOWED
node_repl.exe Success Windows error 32
VCRUNTIME140_1.dll Success Windows error 32

This supports the access-mode hypothesis in this issue. It does not establish that public main is identical to the installed binary.

Environment and recovery already attempted

  • Windows 11 Pro, build 22000.
  • Bundled CLI: 0.162.0-alpha.2.
  • Built-in updater: 26.1002.51308, build 13417, prod, up_to_date.
  • Running Windows package label: OpenAI.Codex_26.1002.6548.0. The difference between these version labels has not been reconciled.
  • Observed October 7, 2026, Asia/Seoul.
  • Repeated app restarts, an earlier PC reboot, documented tool reset/reinitialization, and narrowly approved helper termination have not restored the normal workflows.
  • Chrome profiles, extensions, conversations, and sandbox/security settings were preserved. No runtime deletion, ACL changes, binary replacement, or sandbox disabling was performed.

Relationship to today's Work rollback

The separate new Work window's Send button also remains unresponsive. The status incident acknowledges inability to create new Work threads and rollback of version 26.1002.51308: https://status.openai.com/incidents/01M4ADHMMBK7K92NJFJ0DXRYJM

That announcement does not explicitly cover this Browser/Computer Use runtime sharing violation. Please confirm whether the rollback will also restore Chrome access and normal sandboxed execution, or whether a separate fix is required. Please provide a supported recovery path and restoration guidance that preserves the user's existing data and sandbox protections.

Personal paths are anonymized. No credentials, account details, customer/business data, screenshots, full session transcripts, or raw logs are included.

AmbasaS2 avatar Oct 07 '26 07:10 AmbasaS2

Additional reproduction on another Windows installation, with a before/running/after control experiment supporting the access-mask regression.

Verified environment and failure

  • App updater reports 26.1002.51308, build 13417, prod channel, up_to_date.
  • Windows package label: OpenAI.Codex_26.1002.6548.0_x64.
  • Bundled CLI --version: codex-cli 0.162.0-alpha.2.
  • Configured sandbox: elevated.
  • A normal shell-tool Get-Location fails before process creation. Separately approved outside-sandbox diagnostics work.
  • Fatal target: %LOCALAPPDATA%\OpenAI\Codex\runtimes\cua_node\2c9e75c4e9c71beb\bin\node_repl.exe.
  • Error chain: runtime read/execute validation failed -> open ACL target for root-only update -> Windows error 32 -> setup refresh had errors.

A full Windows reboot was independently verified from LastBootUpTime. After reboot, Codex started new node_repl.exe processes, and the subsequent sandbox refresh failed on that executable again. This was not merely an old process surviving an app restart.

Controlled Win32 experiment

All probes used CreateFileW with FILE_SHARE_READ | FILE_SHARE_WRITE | FILE_SHARE_DELETE (7), OPEN_EXISTING (3), and FILE_FLAG_BACKUP_SEMANTICS (0x02000000). Handles were immediately closed; no content or ACL writes were performed by the probes.

For an independent control, we copied Windows PING.EXE into a disposable project-local diagnostic directory, launched that copy with "-n 4 127.0.0.1", and let it exit normally. The copy was then removed.

Target/state READ_CONTROL + WRITE_DAC (0x00060000) MAXIMUM_ALLOWED (0x02000000)
Control EXE before launch Success Success
Same control EXE while running Success Error 32
Same control EXE after normal exit Success Success
Actual active node_repl.exe Success Error 32

This isolates running-image state and desired access as sufficient to reproduce the sharing violation on this host, without stopping Codex helpers or changing their permissions.

Version-pinned source correlation

The inspected rust-v0.162.0-alpha.2 source follows this path:

  1. setup_provisioning.rs calls ensure_codex_app_runtime_paths_readable during refresh.
  2. setup_provisioning/setup_runtime_bin.rs calls grant_read_execute_aces with inheritance=0 for regular files.
  3. acl.rs opens the target with MAXIMUM_ALLOWED before the ACL/no-op check, with the exact error context seen in the log.

Sources:

  • https://github.com/openai/codex/blob/rust-v0.162.0-alpha.2/codex-rs/windows-sandbox-rs/src/acl.rs#L549-L556
  • https://github.com/openai/codex/blob/rust-v0.162.0-alpha.2/codex-rs/windows-sandbox-rs/src/setup_provisioning/setup_runtime_bin.rs#L138-L147
  • The branch was introduced by 7e8878f60560f8ff964fe38712e53def06402db7 / #49690.
  • The inspected rust-v0.160.0 implementation lacks this branch. This installation's October 6 logs show successful refresh with the 0.160.0 command runner; October 7 logs show the current failure. No rollback A/B test was performed.

These are local reproduction plus version-pinned source evidence, not a debugger/hash match of the installed setup helper or an end-to-end test of a patched build.

Workaround verification and requested fix

A single invocation using the same bundled CLI with: codex.exe sandbox -c 'windows.sandbox="unelevated"' -- powershell.exe -NoProfile -Command Get-Location successfully launched PowerShell; the diagnostic invocation also read a project-local JSON file. Persistent configuration was not changed. This does not establish recovery of every desktop tool or PPT parsing.

Please provide a fixed elevated-sandbox build with regression coverage for active EXE/DLL targets while preserving the child-ACL propagation guarantees intended by #49690. Inspection should avoid requesting unnecessary file-content access; a blanket ACL reset or skipped validation is not proposed.

No credentials, private project paths, account/device identifiers, raw logs, or chat transcripts are included.

Master-Zhi avatar Oct 07 '26 07:10 Master-Zhi

Follow-up to my reproduction above: we are keeping windows.sandbox = "elevated" and are not replacing bundled executables or modifying ACLs

Could you provide an official signed installer/package for the previous working Windows desktop version, or a supported in-app rollback procedure?

On this installation the Windows package updated from 26.930.7945.0 to 26.1002.6548.0; the current app reports 26.1002.51308, build 13417 The previous sandbox logs showed successful operation with command runner 0.160.1

We need to resume Browser Use / Computer Use in the existing desktop chat and authenticated browser tabs, not merely run an older standalone CLI separately

Please clarify:

  • Whether rollback can preserve existing chats, settings and authentication
  • Whether it restores a compatible bundled CLI/runtime/helper set while retaining elevated isolation
  • How to avoid immediate reinstallation of the affected build and subsequently update to the fixed release
  • Whether the rollback announced at https://status.openai.com/incidents/01M4ADHMMBK7K92NJFJ0DXRYJM also addresses this runtime sharing violation, or only the separate issue creating new Work threads

We understand that the status incident does not currently confirm a fix for this sandbox failure An official previous installer or supported rollback would allow work to resume without weakening isolation or manually swapping signed components

KazxMartin avatar Oct 07 '26 07:10 KazxMartin

Consolidating my report #51613 here after reviewing the duplicate suggestion. This adds a measured end-to-end recovery to the access-mask evidence already collected in this issue.

Verified installation and failure

  • Windows 11 Home 24H2, build 26100.4946, x64.
  • App updater: 26.1002.51308, build 13417; Windows package reported by doctor: 26.1002.6548.0.
  • Bundled core: 0.162.0-alpha.2; setting: windows.sandbox = "elevated".
  • Runtime: cua_node/2c9e75c4e9c71beb.
  • An actual Windows reboot was verified. A subsequent elevated-sandbox whoami still failed before execution with helper_unknown_error: setup refresh had errors.
  • The fatal log target was the active node_repl.exe, with open ACL target for root-only update and Windows error 32. Loaded runtime DLLs produced the same failure.

Controlled access-mask comparison

Against the same active node_repl.exe and VCRUNTIME140_1.dll, with share read/write/delete, OPEN_EXISTING, and FILE_FLAG_BACKUP_SEMANTICS:

Desired access Result
READ_CONTROL Success
READ_CONTROL + WRITE_DAC Success
MAXIMUM_ALLOWED Error 32

Temporarily denying only FILE_WRITE_DATA + FILE_APPEND_DATA (mask 0x6) to the current user on node_repl.exe made the MAXIMUM_ALLOWED open succeed. The original ACL was restored after this initial controlled comparison.

The matching published source contains the relevant branch at rust-v0.162.0-alpha.2 acl.rs. The installed helper has not been debugger- or hash-matched to that source.

Measured elevated-sandbox recovery

After backing up original security descriptors, I applied that same narrow, non-inheriting current-user deny ACE to six runtime files with sharing conflicts: node_repl.exe, node.exe, codex-computer-use-swift.exe, VCRUNTIME140_1.dll, VCRUNTIME140.dll, and MSVCP140.dll. Read, execute, and ACL-management access were retained; file contents were not modified.

The configuration remained elevated. Subsequent actual tests showed:

  • Commands ran as <MACHINE>\CodexSandboxOffline.
  • Creating, reading, and deleting files inside the allowed working directory succeeded.
  • A fresh write outside that directory was denied, while the host could write to the same location.
  • The bundled Node runtime executed inside the elevated sandbox.
  • Direct external TCP access that worked from the host returned EACCES inside the sandbox. Loopback remained reachable; this is not a claim of complete network isolation.
  • codex doctor reported sandbox.helpers.status=ok, backend=elevated, provisioning=complete. Setup logs recorded errors=[].

This is a reversible local workaround, not a general recommendation or an upstream fix. It can interfere with in-place runtime updates, and replacing the runtime may require reapplication. ACL backups and a rollback script were retained.

Reliability needs priority

I appreciate the new features and fast iteration, but shipping new capabilities while recurring Windows sandbox failures block basic development work is unacceptable. Reliability is a core feature too. Users should not have to diagnose Win32 handle access or manually alter runtime permissions just to keep working after an update.

Please prioritize a supported elevated-sandbox fix and regression coverage for active EXEs and loaded DLLs. Any fix should preserve deny ACEs and the non-inheriting directory-update guarantees intended by #49690, rather than bypass validation or apply a blanket ACL reset.

I will close #51613 as a duplicate after linking this evidence. Closing that report does not mean the upstream bug is resolved.

Personal paths, account/device identifiers, SIDs, credentials, private project data, and full transcripts are omitted.

doc66666 avatar Oct 07 '26 08:10 doc66666

Consolidating #51623 here. The access-mask diagnosis in this thread matches what I found. This comment adds a tested source fix with a regression test.

Proposed fix: https://github.com/erson/codex/commit/2bd3cd554dd26b40078265df121ca7546981bb58 (2 files, codex-rs/windows-sandbox-rs/src/acl.rs and acl_tests.rs). The repository does not accept external PRs, so I am linking the commit instead.

  • ensure_allow_mask_aces_with_inheritance_impl reads the DACL through fetch_dacl_handle (READ_CONTROL) for both root-only and inheriting grants.
  • It opens the MAXIMUM_ALLOWED handle only when at least one ACE must be written. The no-propagation behavior from #49690 for root-only updates is unchanged. An up-to-date ACL, which is the case for these runtime files, is never opened for write.
  • New test noninheriting_grant_skips_open_for_write_when_ace_is_present: it holds a read-only-sharing handle on the target, like a loaded image. On main it fails with the exact production error (open ACL target for root-only update … (os error 32)). With the fix it passes. noninheriting_read_attributes_preserve_unprotected_child_dacl still passes, and the set of other failing tests in cargo test -p codex-windows-sandbox is unchanged on my machine.

End-to-end, Windows 11 26200, app 26.1002 open with the computer-use helper holding the runtime files. The baseline is the bundled 0.162.0-alpha.2. The fix is a local build of main with the commit.

Test Baseline Fix
codex sandbox -P :workspace: cmd read/write, powershell.exe and pwsh.exe write/read 4/4 fail, setup refresh had errors 4/4 pass, errors=[]
Agent turn: codex exec -s workspace-write -c windows.sandbox="elevated" -c features.prefer_mxc=false, same model on both builds Failed to create unified exec process: helper_unknown_error: setup refresh had errors, no file written errors=[], probe file written and read back

The fix also removes the non-fatal failed to grant non-inheriting read-attributes ACE on user profile … (os error 32) warning.

Limits:

  • The agent-turn run paired the released codex-code-mode-host.exe with the local codex.exe, because the V8 prebuilt could not be downloaded.
  • On my machine the app later switched to MXC (prefer_mxc), which does not use this code path. I could not test the fix inside the app itself.

erson avatar Oct 07 '26 08:10 erson

Additional affected installation: Windows 11 build 22631; bundled 0.162.0-alpha.2 fails, separate npm 0.154.0 executes a read-only probe

Submitted at the affected user's explicit request. This adds an independent reproduction and an older-CLI comparison to this existing report rather than opening another duplicate. Personal paths and identifiers are redacted. The observations below are from this user's logs, screenshots, and reported test results, not from the other reporters' machines.

Environment

  • Observed October 7, 2026.
  • Windows 11, OS version 10.0.22631, x64, zh-CN.
  • ChatGPT-account authentication; subscription tier not verified for this report.
  • Desktop-bundled executable reports codex-cli 0.162.0-alpha.2.
  • Exact desktop app package version was not collected; it should not be inferred from the bundled CLI version.
  • Bundled executable directory in the captured log: %LOCALAPPDATA%\OpenAI\Codex\bin\979a96ce184041d1.
  • Runtime directory: %LOCALAPPDATA%\OpenAI\Codex\runtimes\cua_node\2c9e75c4e9c71beb.
  • Windows sandbox setting was restored to elevated after an unsuccessful unelevated test.
  • The user first noticed the failure after a Windows update. This is temporal context, not proof that the Windows update caused it.

Desktop reproduction and actual result

  1. Open a local project with the elevated Windows sandbox.
  2. Create or resume a thread and request a harmless command, cmd.exe /d /c echo CODEX_SANDBOX_OK.
  3. Thread creation/resumption fails while loading instructions, before the requested command runs:
failed to load AGENTS.md instructions for environment 'local':
fs sandbox helper failed with status exit code: 1:
windows sandbox failed: helper_unknown_error: setup refresh had errors

The same failure occurs in a newly created empty project and new thread, not just the original project/thread. The captured sandbox log explicitly includes the new probe directory and the same DLL error.

Relevant log excerpt

Paths are anonymized; the Chinese Windows error text is retained. It means that another process is using the file.

[2026-10-07T07:13:32.883966300+00:00]
runtime read/execute validation failed:
validate runtime read/execute access on
%LOCALAPPDATA%\OpenAI\Codex\runtimes\cua_node\2c9e75c4e9c71beb\bin\node_modules\@oai\sky\bin\windows\swift\x64\VCRUNTIME140_1.dll:
open ACL target for root-only update:
另一个程序正在使用此文件,进程无法访问。 (os error 32)

[2026-10-07T07:13:32.886130100+00:00]
setup error: setup refresh had errors

[2026-10-07 16:13:32.889 codex.exe]
setup refresh: exited with status ExitStatus(ExitStatus(1))

setup_error.json contained:

{"code":"helper_unknown_error","message":"setup refresh had errors"}

Manual sandbox setup --elevated --current-user reported success. Separate provisioning logs show WFP setup succeeded and setup provisioning binary completed; subsequent per-task refreshes still failed. doctor reported sandbox.helpers.status=fail with the generic structured provisioning failure.

Process observations and unsuccessful recovery attempts

  • Process Explorer identified codex-computer-use-swift.exe as loading the exact DLL above.
  • After a normal desktop-app exit, that DLL search result disappeared.
  • With the desktop app open, stopping just the Swift helper did not restore execution. It appeared again when the user retried creating a thread.
  • Disabling Computer Use in the available settings page did not prevent the helper from being present. A Computer Use plugin/MCP entry was not available in this user's UI.
  • Reinstalling the desktop application did not resolve the failure.
  • Moving the CUA runtime to a backup location did not resolve it. The later report again contains the runtime path above; it does not establish whether the earlier move completed fully or the runtime was recreated.
  • unelevated was not a usable fallback: it explicitly refused to run because it could not enforce the active deny-read restrictions. The configuration was returned to elevated; those restrictions were not intentionally bypassed.

CLI comparison

The desktop application was normally closed for the standalone CLI tests. Both used the same Windows user and the same dedicated probe directory. The directory was initialized as a Git repository during troubleshooting.

Bundled 0.162.0-alpha.2: failed. The CLI reached model/tool execution using the configured gpt-6-luna model, approval: never, and sandbox: read-only. Actual command-tool calls failed before the process started:

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

The post-run process-inspection command was accidentally concatenated with another PowerShell command and did not execute. Consequently, this test does NOT establish whether the Swift helper was absent throughout the CLI run, or whether that run failed on the same underlying file. A new low-level log for that CLI attempt was not captured.

Separate npm @openai/[email protected]: succeeded on the minimal probe. The user ran the following after changing to the probe directory:

npx -y @openai/[email protected] --model gpt-5.6-luna --ask-for-approval never exec --skip-git-repo-check --sandbox read-only "Actually execute cmd.exe /d /c echo CODEX_SANDBOX_OK and return the real command output. Do not modify any files."

The user reported actual execution output, not just the model repeating the requested text:

exec
cmd.exe /d /c echo CODEX_SANDBOX_OK

CODEX_SANDBOX_OK

Comparison limitations: This was not a fully controlled version-only A/B test. The old client initially rejected the configured gpt-6-luna model, so the successful test explicitly selected gpt-5.6-luna. Installation location, client configuration interpretation, and runtime/process state may also differ. The successful minimal read-only probe does not verify all sandbox restrictions, project writes, or desktop functionality. It supports investigating a client/runtime regression but does not identify the introducing commit or prove that all Windows permissions are healthy.

Historical October 5 logs also show repeated successful setup refreshes with errors=[] while using codex-command-runner-0.155.0-alpha.9.2.exe. These are historical observations, not an identical-environment control.

Requested resolution

Please investigate the runtime ACL validation path for loaded DLLs and provide a supported desktop fix or recovery that preserves sandbox protections, configuration, project files, and conversation history. Please surface the underlying file and Windows error in the UI rather than only helper_unknown_error.

The access-mask diagnosis and proposed patch discussed by other reporters have not been independently tested on this user's machine. No claim is made here that an upstream fix has shipped.

Only this sanitized summary and necessary log excerpts are submitted. Full diagnostic files, private project contents, chat transcripts, session IDs, usernames, SIDs, credentials, and auth.json are not attached.

Tong-tastsy avatar Oct 07 '26 09:10 Tong-tastsy

Adding another affected Windows installation, observed October 7, 2026.

Environment:

  • Windows package: OpenAI.Codex, version 26.1002.6548.0
  • Helper: %LOCALAPPDATA%\OpenAI\Codex\bin\979a96ce184041d1
  • Runtime: %LOCALAPPDATA%\OpenAI\Codex\runtimes\cua_node\2c9e75c4e9c71beb

Reproduction: request an ordinary PowerShell Get-Location through the desktop app. It fails before process creation with "helper_unknown_error: setup refresh had errors". Expected: sandbox setup completes and the command runs.

The sandbox log reports "runtime read/execute validation failed" for the runtime's bin\node_repl.exe; earlier entries also identify node.exe. The error chain includes: "open ACL target for root-only update: 另一个程序正在使用此文件,进程无法访问。 (os error 32)" The Chinese message means another process is using the file.

A full app exit/reopen, Windows app Repair, and narrowly terminating the two identified node_repl.exe processes did not restore execution. Process Explorer showed executable image mappings, but no third-party File handle was identified. This does not establish which process, if any, holds an exclusive file handle.

These observations are consistent with the MAXIMUM_ALLOWED explanation discussed here and in #51623. However, no controlled access-mask comparison was performed on this installation, and the installed helper was not matched to the public source. The cause is therefore not independently proven here. No manual ACL changes, sandbox weakening, data clearing, or self-built helper installation were performed.

Please identify a fixed, officially signed desktop/helper version, or a supported recovery procedure preserving sandbox protections, configuration, projects, and conversation history. Updating a standalone CLI would not establish that the desktop app's bundled helper has been replaced. The duplicate closure of #51623 does not establish that a desktop fix has shipped.

cuiqian34-tech avatar Oct 07 '26 09:10 cuiqian34-tech

Independent Windows 10 reproduction: same bundled CLI succeeds with Desktop closed, fails after reopening

This adds an app-closed/app-reopened comparison on another installation to the access-mask and automatic-respawn evidence already reported here.

Environment

  • Windows 10, build 19045.
  • Desktop package: OpenAI.Codex 26.1002.6548.0.
  • Bundled CLI: codex-cli 0.162.0-alpha.2.
  • Configured Windows sandbox: elevated.
  • Runtime: cua_node\2c9e75c4e9c71beb.
  • Tests performed October 7, 2026, Asia/Seoul.
  • Same Windows user, bundled executable, working directory, and command for the final closed/open comparison.

Desktop closed versus reopened

Initial dot-delegated tasks failed before command execution, despite the computer appearing connected/attached:

exec-server rejected request (-32603):
helper_unknown_error: setup refresh had errors

After fully closing Desktop, a process check found no relevant Desktop/CUA runtime processes. This command using the existing bundled CLI succeeded:

& "<BUNDLED_CORE>\codex.exe" sandbox powershell.exe -NoProfile -Command Get-Location

Sanitized output:

APP_RUNTIME_PROCESS_COUNT=0

Path
----
<WORKSPACE>

TEST_EXIT=0

After reopening Desktop, a new codex-computer-use-swift.exe appeared. The identical command failed:

windows sandbox failed: helper_unknown_error: setup refresh had errors
TEST_EXIT=1

Relevant log evidence

Selected excerpts from %USERPROFILE%.codex.sandbox\sandbox.2026-10-07.log follow. Personal paths are anonymized, lines are wrapped, and the localized Windows message is translated as marked. ISO timestamps are UTC (KST = UTC+09:00).

Earlier version, at 16:45 KST:

[2026-10-07T07:45:26.453776200+00:00]
setup refresh: processed 2 write roots (read roots delegated); errors=[]

[2026-10-07 16:45:26.453 codex-windows-sandbox-setup.exe]
setup binary completed

The surrounding entries identified Desktop package 26.930.3930.0 and command runner 0.160.0. After switching to package 26.1002.6548.0, the first recorded runtime-validation failure was at 16:57 KST:

[2026-10-07T07:57:47.811269800+00:00]
runtime read/execute validation failed:
validate runtime read/execute access on
<USERPROFILE>\AppData\Local\OpenAI\Codex\runtimes\
cua_node\2c9e75c4e9c71beb\bin\node_repl.exe:
open ACL target for root-only update:
[Translated Windows message: The process cannot access the file
because it is being used by another process.] (os error 32)

[2026-10-07T07:57:47.818065200+00:00]
setup error: setup refresh had errors

After the final Desktop reopening, the fresh 18:27:57 KST error-list entry identified the DLL instead:

[2026-10-07T09:27:57.704858300+00:00]
setup refresh: processed 0 write roots (read roots delegated);
errors=["runtime read/execute validation failed:
validate runtime read/execute access on
<USERPROFILE>\\AppData\\Local\\OpenAI\\Codex\\runtimes\\
cua_node\\2c9e75c4e9c71beb\\bin\\node_modules\\@oai\\sky\\
bin\\windows\\swift\\x64\\VCRUNTIME140_1.dll:
open ACL target for root-only update:
[Translated Windows message: The process cannot access the file
because it is being used by another process.] (os error 32)"]

Limits and relationship to the proposed fix

The verified result is limited to a sandboxed Get-Location succeeding with Desktop closed and failing after reopening. It does not establish recovery of general CLI agent work, Browser/Computer Use, or all sandbox restrictions. No clean-install reproduction or debugger/hash match of the installed helper to source was performed.

I have read the existing proposed fix and reported tests, including commit 2bd3cd5. Its author reports delaying the MAXIMUM_ALLOWED open until an ACE actually needs writing, preserving root-only no-propagation behavior, and testing the change against active runtime files. I have not applied or independently tested that patch on this Windows 10 installation. This comment adds independent reproduction evidence, not a claim that an official fix has shipped.

Please identify a supported, officially distributed Desktop/helper version when the fix is available.

Diagnostic sequence, access-mask probes, and mistakes
  • node_repl.exe and node.exe had identical owners/ACLs, including inherited ReadAndExecute for CodexSandboxUsers and FullControl for the current user, SYSTEM, and Administrators.
  • On active node_repl.exe, CreateFileW with READ_CONTROL, READ_CONTROL | FILE_READ_DATA, or READ_CONTROL | WRITE_DAC succeeded; MAXIMUM_ALLOWED failed with error 32. All probes used share read/write/delete, OPEN_EXISTING, and FILE_FLAG_BACKUP_SEMANTICS. Handles were immediately closed; no content or ACL writes were performed by the probes.
  • Windows Restart Manager reported two Desktop-owned node_repl.exe processes as users of the file. Approved termination of those processes cleared its MAXIMUM_ALLOWED failure.
  • Two remaining Desktop-owned node.exe processes produced the same failure. After their approved termination, both executable files opened successfully.
  • Sandbox validation then failed on VCRUNTIME140_1.dll. Restart Manager reported codex-computer-use-swift.exe as a user of this DLL. READ_CONTROL succeeded while MAXIMUM_ALLOWED failed.
  • After approved termination of that helper, Desktop immediately created another instance and the DLL failure persisted. Repeated termination was not a durable recovery.
  • An early sandbox windows --help invocation unexpectedly entered setup. Later, sandbox windows powershell.exe ... used the wrong syntax for this CLI and, once Desktop was closed, attempted to launch windows, producing error 2. codex help sandbox established the correct syntax. Both final closed/open tests used that corrected syntax.
  • Sandbox invocations can refresh ACLs and state files; the investigation was therefore not entirely state-preserving. No manual ownership/ACL edits, cache deletion, sandbox-mode changes, reinstall, or project/branch/stash/database modifications were performed.
  • App restart, Windows reboot, and revoking/regranting computer access had previously been reported unsuccessful; those earlier attempts were not repeated as controlled tests here.

Only this sanitized summary and selected diagnostic output are submitted. Full conversation transcripts, raw log files, private workspace paths, account/device names, credentials, and sandbox secrets are not attached.

JooyoungChoi14 avatar Oct 07 '26 09:10 JooyoungChoi14

Additional affected installation: controlled cold/warm elevated comparison

Submitted at the affected user's explicit request. This adds a controlled comparison showing that a successful cold setup does not prevent the failure from returning after the desktop runtime starts.

Environment

  • Windows 11 Home, OS version 10.0.26200.
  • Desktop updater: version 26.1002.51308, build 13417, prod channel, up_to_date.
  • Windows package version: 26.1002.6548.0.
  • Bundled CLI: codex-cli 0.162.0-alpha.2.
  • Observed October 7, 2026.

Same CLI command, cold versus warm

The bundled executable was invoked explicitly from an ordinary user's external process:

codex.exe sandbox -c 'windows.sandbox="elevated"' -- C:\Windows\System32\cmd.exe /d /c echo ELEVATED_TEST

The persistent configuration remained unelevated; this probe overrides the mode only for its own invocation.

Runtime state Actual result
Desktop app fully closed; all node_repl.exe processes exited At 09:32:58 UTC: exit code 0, expected marker printed, empty stderr
Desktop app reopened; node_repl.exe processes active At 09:34:47 UTC: exit code 1, helper_unknown_error: setup refresh had errors

The cold probe ran as an independent, manually started, ordinary-user Windows scheduled task. The task waited for the runtime processes to exit and did not terminate them or edit the persistent configuration. It was removed after collecting the result.

The warm failure again logged:

runtime read/execute validation failed:
validate runtime read/execute access on
%LOCALAPPDATA%\OpenAI\Codex\runtimes\cua_node\<runtime-id>\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)

Independent, non-mutating access checks

Against the installed, running node_repl.exe, CreateFileW with OPEN_EXISTING and share read/write/delete gave:

Desired access Result
READ_CONTROL Success
`READ_CONTROL WRITE_DAC`
`GENERIC_READ GENERIC_WRITE`

Handles were closed immediately; the installed executable and its ACL were not modified.

A separate control used a private copy of cmd.exe and only our own test process:

Control executable state ACL-only open File read/write open
Not running Success Success
Running Success Error 32
Stopped Success Success

These observations confirm that the failure depends on a running executable and the access requested. They do not capture the actual helper's CreateFileW arguments or prove that the public source exactly matches the installed binary.

Current workaround and scope

The persistent mode remains unelevated. Normal desktop shell operations, workspace read/write and Python execution now work on this installation; Browser/Computer Use recovery has not been verified.

There was also an independent MXC error 64 while enumerating an unused, reconnecting SMB drive O:. Removing that mapping restored MXC shell launches but did not fix the elevated error above.

No installed binary replacement or manual ACL modification was attempted. The configured app updater offers no newer build. Please provide a supported fixed desktop/helper version and regression coverage for ACL validation of active bundled executables/DLLs.

Only this sanitized summary is submitted; no credentials, personal paths, private project contents, screenshots or full chat transcripts are attached.

Ivlichev avatar Oct 07 '26 09:10 Ivlichev

My sandbox failure appears to match this issue. Here is an independent reproduction with a timeline of the Computer Use helper processes observed during troubleshooting.

Environment

  • Platform: Windows x64
  • Codex desktop package: 26.1002.6548.0 (recorded in sandbox.log)
  • Subscription: ChatGPT Pro
  • In-app feedback: Submitted with diagnostic logs
  • Feedback ID: 01a0f121-718a-7598-ab13-f2f6a9df2007

Minimal failure

Even the read-only PowerShell command Get-Location fails before the target process starts. This occurs in both an existing local task and a newly created task using its default workspace. The computer is reported as connected and authorized for task execution.

The returned error is:

exec-server rejected request (-32603): helper_unknown_error: setup refresh had errors

The sandbox log reports Windows error 32 (sharing violation) at open ACL target for root-only update, followed by runtime read/execute validation failed. The setup process exits with code 1.

The failing file varies between attempts:

  • %LOCALAPPDATA%\OpenAI\Codex\runtimes\cua_node\2c9e75c4e9c71beb\bin\node_repl.exe
  • %LOCALAPPDATA%\OpenAI\Codex\runtimes\cua_node\2c9e75c4e9c71beb\bin\node_modules\@oai\sky\bin\windows\swift\x64\VCRUNTIME140_1.dll

A separate warning about adding a read-attributes ACE to the user profile explicitly says continuing setup. The fatal errors list identifies the runtime file validation failure above.

Process observations and timeline

All times below are October 7, 2026, UTC+8. Process details were checked using PowerShell and Process Explorer.

Time Observation
16:01–16:05 Sandbox validation failed on node_repl.exe with error 32.
16:09:26 After reopening the desktop app, codex-computer-use-swift.exe PID 37632 had this recorded start time. Its parent was ChatGPT.exe PID 36160. Its executable was in the same Sky runtime directory as the DLL above.
16:10:29 Sandbox validation failed on VCRUNTIME140_1.dll.
16:17:57 node_repl.exe PID 23404 started, with parent node.exe PID 23268. Both used the Codex-bundled runtime.
16:18:23 Another node_repl.exe, PID 27400, started with parent node.exe PID 35580, also using the Codex-bundled runtime.
16:37 A command-only retry still failed on node_repl.exe.
16:41 After I no longer saw node_repl.exe in Task Manager, a command-only retry still failed. The corresponding log identified VCRUNTIME140_1.dll as the sharing-violation target.
16:57:04 A replacement codex-computer-use-swift.exe, PID 38584, had this recorded start time after I manually terminated only PID 37632. Its parent was still ChatGPT.exe PID 36160.
16:57:48 Get-Location still failed. This test did not invoke CUA, JavaScript or browser tools. The replacement helper had already started before the test request was sent.

The visible node_repl.exe instances changed and disappeared during the investigation without me manually terminating them. Because the two instances listed above started after the original failures, they cannot explain those earlier failures themselves.

Process Explorer also found a DLL match within the affected CUA runtime for codex-computer-use-swift.exe PID 37632.

Terminating the helper was not a durable workaround in my environment. However, I have not established why the desktop app recreated it, or which specific file handle caused error 32. DLL loading and matching timestamps alone do not prove causation or a process leak.

Additional browser failure — relationship not confirmed

Separately, the CUA JavaScript runtime executes and enumerates a Chrome extension provider, but tab-list requests fail with:

nodeRepl.fetch request failed

Both listing tabs and user.openTabs() failed. One recorded request ran from 16:21:13.995 to 16:21:35.011. No underlying cause, error code or HTTP status was exposed.

The empty tabs array accompanied an error; it was not evidence that Chrome had no open tabs.

I am including this as a potentially related observation, not claiming that it has the same root cause as the sandbox failure.

Troubleshooting performed

  • Reopening the desktop app did not resolve the sandbox failure.
  • I had previously tried repeated app restarts and extension reinstalls for the browser problem, without resolving it.
  • I tested both an existing local task and a newly created task.
  • I manually terminated only the identified Computer Use helper, not its parent or process tree.
  • During this investigation, I did not apply community patches, modify runtime ACLs, delete runtime files or disable sandbox protections.
  • I have not established a clean-install reproduction.

Impact and follow-up

Local project work and Git backups are blocked because commands cannot start. Browser automation is also unavailable despite the Chrome provider being detected.

I hope the helper-process timeline and submitted feedback logs help investigate the interaction between Computer Use runtime lifecycle management and Windows sandbox validation.

If the browser request failure should be tracked separately, please let me know which additional diagnostics would be useful.

PalaBing avatar Oct 07 '26 09:10 PalaBing

🔴 CRITICAL — application-blocking regression: independent Windows 10 reproduction and verified fallback

Requested severity: CRITICAL. On this affected installation, ordinary local command execution and the JavaScript file reader failed before user code could run, blocking the normal coding workflow. The app could still display chat and use some connectors; separately approved outside-sandbox diagnostics worked. This is an application-blocking execution regression, not a claim that every app feature was unavailable.

Verified environment

  • Windows 10 x64, OS version 10.0.19045.0.
  • Installed Windows package version: OpenAI.Codex 26.1002.6548.0 (package version, not an independently verified About-dialog version).
  • Bundled CLI: codex-cli 0.162.0-alpha.2, verified with --version.
  • Initial configuration: sandbox_mode = "workspace-write", [windows] sandbox = "elevated".
  • Current helper directory identifier: 979a96ce184041d1; runtime identifier: cua_node\2c9e75c4e9c71beb.
  • Observed October 7, 2026.

Reproduction on the affected installation

  1. In an existing local desktop chat, request an ordinary sandboxed PowerShell Get-Location or a read of an existing text file.
  2. Execution fails before the requested command starts:
    Failed to create unified exec process:
    helper_unknown_error: setup refresh had errors
    
  3. Trying the alternate JavaScript file reader also fails:
    trusted Node process exited unexpectedly; kernel reset, rerun your request
    
  4. Repeat the shell check with a working directory outside the project: same setup failure.
  5. Fully exit and reopen the desktop app while retaining elevated: both readers still fail, and a fresh sandbox log records the same error.

A clean-install reproduction has not been established.

Sanitized log evidence

Personal paths are replaced with environment-variable placeholders; the localized Windows message is translated to English. Line wrapping is added.

runtime read/execute validation failed:
validate runtime read/execute access on
%LOCALAPPDATA%\OpenAI\Codex\runtimes\cua_node\2c9e75c4e9c71beb\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
setup refresh: exited with status ExitStatus(ExitStatus(1))

The same day's log shows successful refreshes with helper directory 5ea220ae823df3d7, followed approximately two minutes later by failures with 979a96ce184041d1. That is regression evidence by timing; the exact introducing change has not been independently proven.

Independent read-only diagnostics

  • Windows Restart Manager identified active Codex-owned node_repl.exe processes using the affected executable. Process ancestry led to the current desktop app; no orphaned Node/REPL process was identified in the inspected snapshot.
  • Controlled CreateFileW probes used OPEN_EXISTING, share read/write/delete (7), and flags 0. Handles were immediately closed; no file contents or ACLs were changed:
Requested access Result on the running node_repl.exe
READ_CONTROL Success
WRITE_DAC Success
READ_CONTROL + WRITE_DAC Success
GENERIC_READ Success
GENERIC_WRITE Error 32
GENERIC_READ + GENERIC_WRITE Error 32

These results support investigating unnecessary file-content access during permission handling. The actual helper's access arguments were not captured, so they do not independently prove its implementation defect.

Verified temporary recovery and security tradeoff

After preserving and hash-verifying the original configuration, we changed only:

[windows]
sandbox = "unelevated"

The JavaScript reader recovered first, while ordinary shell execution continued to invoke the failing setup path. After another full desktop exit/reopen, both ordinary shell execution and the JavaScript reader successfully read an existing workspace text file in the original chat, without per-command escalation. The saved setting was independently rechecked.

This confirms a fallback for the tested shell/file-reading paths. It does not establish recovery of all app features, browser/computer-use workflows, or every sandbox restriction, and it does not repair the elevated implementation.

🔴 The working persistent fallback required accepting weaker sandbox isolation. OpenAI's documentation says unelevated mode retains ACL-based filesystem boundaries but lacks the separate sandbox-user boundary and has weaker network isolation. This is a reduction in protection, not evidence of system compromise and not equivalent to disabling all sandboxing.

No runtime binaries were replaced, no runtime files were deleted, and no manual ACL edits or targeted process terminations were used.

Requested resolution

Please prioritize a supported desktop/helper fix that restores normal execution with elevated isolation intact, identify the fixed version, and provide an actionable error/recovery path instead of the generic helper_unknown_error. Regression coverage should include permission validation of active bundled runtime executables and DLLs.

Only this anonymized report is submitted: no personal paths, usernames, machine names, process IDs, session IDs, credentials, project contents, screenshots, or raw diagnostic archives are included.

Tr1n1t4 avatar Oct 07 '26 09:10 Tr1n1t4

I can reproduce the same issue on Codex Desktop for Windows.

Environment:

  • Codex Desktop version: 26.1002.51308
  • Windows 10 Home 10.0.19045 x64
  • Windows sandbox: elevated
  • workspace-write mode

The failure persists after fully closing and restarting Codex Desktop.

All local command execution is blocked before the requested operation starts with:

helper_unknown_error: setup refresh had errors

My sandbox log consistently shows the same fatal failure reported here:

runtime read/execute validation failed: validate runtime read/execute access on %USERPROFILE%\AppData\Local\OpenAI\Codex\runtimes\cua_node\2c9e75c4e9c71beb\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 observations:

  • the issue is reproducible after a complete Codex Desktop restart;
  • reverting my approval configuration back to approval_policy = "never" did not change the behavior;
  • the failure happens during sandbox setup refresh, before the requested project operation starts;
  • repeated attempts consistently fail on the same node_repl.exe runtime validation.

I am attaching a sanitized sandbox log containing the repeated failures.

This appears to be the same Windows sandbox/runtime regression described in this issue.

sandbox.2026-10-07.sanitized_V2.log

jojodunet avatar Oct 07 '26 10:10 jojodunet

Additional affected installation, with independent controlled reproduction and recovery evidence collected on 7 October 2026.

Environment: Windows x64; desktop updater reports 26.1002.51308 (build 13417); Windows package 26.1002.6548.0; bundled CLI 0.162.0-alpha.2; helper directory 979a96ce184041d1; runtime cua_node/2c9e75c4e9c71beb.

Impact and reproduction

With windows.sandbox = "elevated", ordinary desktop command execution failed before the requested command started:

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

The fatal sandbox log reported open ACL target for root-only update and Windows error 32 on the active node_repl.exe. After stopping that process, the failure moved to a loaded runtime DLL (VCRUNTIME140_1.dll). Cold setup with the desktop fully closed passed, but reopening the desktop brought the failure back. A temporary unelevated fallback restored ordinary command execution after restart.

Controlled access-mask evidence

Before modifying installed runtime permissions, a disposable copy of Windows PING.EXE was run against loopback. CreateFileW probes used OPEN_EXISTING, share read/write/delete, and FILE_FLAG_BACKUP_SEMANTICS:

Running executable state Requested access Result
Original DACL MAXIMUM_ALLOWED Error 32
Original DACL READ_CONTROL Success
Current-user non-inheriting deny of only FILE_WRITE_DATA + FILE_APPEND_DATA (0x6) MAXIMUM_ALLOWED Success
Same restricted DACL READ_CONTROL + WRITE_DAC Success
Exact original DACL restored while still running MAXIMUM_ALLOWED Error 32

The disposable file's contents were unchanged, its original DACL was restored, and the test process was stopped. All six affected installed runtime files also showed the original MAXIMUM_ALLOWED sharing conflict.

This supports the access-mask diagnosis in this thread and the matching published 0.162.0-alpha.2 source. The installed binary was not debugger-matched to that source.

Elevated recovery with the desktop open

Following the narrow restriction described in the earlier report, we backed up exact DACLs, owners and SHA-256 hashes and applied the same non-inheriting current-user deny of mask 0x6 to six runtime files: node_repl.exe, node.exe, codex-computer-use-swift.exe, VCRUNTIME140_1.dll, VCRUNTIME140.dll and MSVCP140.dll. No binaries were replaced or changed; hashes and owners remained unchanged. No new access was granted.

Subsequent tests with the desktop open passed:

  • Explicit elevated sandbox with features.prefer_mxc=false: commands ran under the separate CodexSandboxOffline account.
  • Python created/read a file inside the test workspace; a write to a sibling directory outside it was denied and its canary remained unchanged.
  • Bundled Node v24.21.0 and PowerShell executed successfully.
  • Setup logs recorded errors=[].
  • Browser runtime initialization/discovery succeeded.
  • After restoring the saved default to elevated, a fresh codex sandbox -P :workspace invocation without a sandbox-mode override still ran under the separate sandbox account.

Limit: the existing desktop chat still retains its earlier fallback session until reload; final ordinary-tool verification after that reload is pending. These tests do not establish every browser/native-app feature or complete network isolation.

This ACL change is a reversible local workaround, not a supported permanent fix. It may interfere with in-place runtime updates, and new runtime directories do not inherit it.

Please prioritize a supported fix that permits validation of active runtime EXEs/DLLs without unnecessary content-write access, preserves existing deny ACEs and root-only/no-propagation guarantees, and reports an actionable error. Regression tests should cover already-correct ACLs on active executables and loaded DLLs. Users should not need a weaker sandbox fallback or manual runtime ACL changes to run basic commands.

Personal paths, account/device identifiers, SIDs, credentials, project contents and raw logs are omitted.

Blacknova-tech avatar Oct 07 '26 11:10 Blacknova-tech

Additional independent Windows reproduction and candidate source patch. Related duplicate reports #51613 and #51623 were consolidated into this open issue. This comment adds the exact tested diff and does not claim an official signed release.

Windows sandbox root-only ACL check requests MAXIMUM_ALLOWED and fails on active runtime images

Environment

  • ChatGPT/Codex desktop app 26.1002.51308 (build 13417)
  • Windows Store package OpenAI.Codex 26.1002.6548.0, x64
  • Bundled codex-cli 0.162.0-alpha.2
  • Windows 11 x64
  • Official Store checks on 2026-10-07: winget reported no newer package; Microsoft Store CLI "store update ChatGPT" reported already up to date.
  • Authentication, update policy, and sandbox enforcement were not disabled.

Problem

A cloud-backed task using its connected Windows executor cannot start even Get-Location. The failure occurs before the requested process is created: Failed to create unified exec process: exec-server rejected request (-32603): helper_unknown_error: setup refresh had errors

The sandbox log identifies: runtime read/execute validation failed ... 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)

Root-cause evidence

The exact source tag rust-v0.162.0-alpha.2, commit 74e804deeb1241d5fe699b31fb319f7d46454c42, opens root-only ACL targets with MAXIMUM_ALLOWED before checking whether their DACL needs a change. On this machine, CreateFileW with MAXIMUM_ALLOWED, share read/write/delete, and BACKUP_SEMANTICS fails with error 32 on active runtime images. Metadata-only READ_CONTROL / WRITE_DAC handles can open the same objects. A Windows tempfile regression holding a handle that denies content writes reproduces error 32 with the original source.

Proposed narrow fix

  • For verified regular files, open only ACL metadata for the initial DACL check.
  • If no update is needed, return without acquiring write access.
  • If a DACL update is needed, use ReOpenFile on the same file object with READ_CONTROL | WRITE_DAC.
  • Preserve the existing MAXIMUM_ALLOWED behavior for directories/unknown types, because SetSecurityInfo uses it to suppress propagation of existing inheritable ACEs.
  • Preserve the existing GRANT_ACCESS, deny-ACE, null-DACL, and error handling.

Validation

The original-source regression fails with the exact error 32. The patched source passed 14 targeted Windows regressions covering shared-file updates, existing deny ACEs, metadata-only no-op access, missing paths, existing child DACL preservation, future inheritance, and runtime permission repair. In a user-authorized temporary local trial, the original task's Get-Location exited 0 and sandbox setup logged errors=[]. The local trial used an unsigned source build (Rust 1.96.0; the tag declares 1.95.0), not an official OpenAI release. No approval, audit, updater, or sandbox enforcement was bypassed.

Deployment limitation

The desktop's bundled-component hash verification restores the official helper on restart. This is expected integrity behavior and was not modified. An official signed release containing the fix is needed for a durable resolution.

Patch supplied inline below Patch SHA-256: A6E00FB8F055609C480EE2BCF14F8203BF30D948AD22A0E9612AE55DBC9020A8

This report intentionally omits account identifiers, thread identifiers, local usernames, private task content, market data, credentials, and sandbox secrets.

Candidate patch

diff --git a/codex-rs/windows-sandbox-rs/src/acl.rs b/codex-rs/windows-sandbox-rs/src/acl.rs
index 0ef5e44..58d1cb1 100644
--- a/codex-rs/windows-sandbox-rs/src/acl.rs
+++ b/codex-rs/windows-sandbox-rs/src/acl.rs
@@ -6,9 +6,11 @@ use anyhow::Result;
 use anyhow::anyhow;
 use anyhow::ensure;
 use std::ffi::c_void;
+use std::fs::File;
 use std::fs::OpenOptions;
 use std::os::windows::fs::OpenOptionsExt;
 use std::os::windows::io::AsRawHandle;
+use std::os::windows::io::FromRawHandle;
 use std::path::Path;
 use windows_sys::Win32::Foundation::CloseHandle;
 use windows_sys::Win32::Foundation::ERROR_SUCCESS;
@@ -52,6 +54,7 @@ use windows_sys::Win32::Storage::FileSystem::FILE_FLAG_BACKUP_SEMANTICS;
 use windows_sys::Win32::Storage::FileSystem::FILE_GENERIC_EXECUTE;
 use windows_sys::Win32::Storage::FileSystem::FILE_GENERIC_READ;
 use windows_sys::Win32::Storage::FileSystem::FILE_GENERIC_WRITE;
+use windows_sys::Win32::Storage::FileSystem::FILE_READ_ATTRIBUTES;
 use windows_sys::Win32::Storage::FileSystem::FILE_SHARE_DELETE;
 use windows_sys::Win32::Storage::FileSystem::FILE_SHARE_READ;
 use windows_sys::Win32::Storage::FileSystem::FILE_SHARE_WRITE;
@@ -61,6 +64,7 @@ use windows_sys::Win32::Storage::FileSystem::FILE_WRITE_EA;
 use windows_sys::Win32::Storage::FileSystem::GetFinalPathNameByHandleW;
 use windows_sys::Win32::Storage::FileSystem::OPEN_EXISTING;
 use windows_sys::Win32::Storage::FileSystem::READ_CONTROL;
+use windows_sys::Win32::Storage::FileSystem::ReOpenFile;
 use windows_sys::Win32::Storage::FileSystem::VOLUME_NAME_NONE;
 use windows_sys::Win32::Storage::FileSystem::WRITE_DAC;
 use windows_sys::Win32::Storage::FileSystem::WRITE_OWNER;
@@ -508,6 +512,21 @@ unsafe fn dacl_has_deny_mask(p_dacl: *mut ACL, scope: DenyAceScope, deny_mask: u
 const WRITE_ALLOW_MASK: u32 =
     FILE_GENERIC_READ | FILE_GENERIC_WRITE | FILE_GENERIC_EXECUTE | DELETE;
 
+fn reopen_acl_handle(file: &File, desired_access: u32) -> std::io::Result<File> {
+    let handle = unsafe {
+        ReOpenFile(
+            file.as_raw_handle() as HANDLE,
+            desired_access,
+            FILE_SHARE_READ | FILE_SHARE_WRITE | FILE_SHARE_DELETE,
+            FILE_FLAG_BACKUP_SEMANTICS,
+        )
+    };
+    if handle == INVALID_HANDLE_VALUE {
+        return Err(std::io::Error::last_os_error());
+    }
+    Ok(unsafe { File::from_raw_handle(handle as _) })
+}
+
 unsafe fn dacl_allow_mask_needs_refresh(
     p_dacl: *mut ACL,
     psid: *mut c_void,
@@ -546,31 +565,59 @@ unsafe fn ensure_allow_mask_aces_with_inheritance_impl(
     access_mode: ACCESS_MODE,
     inheritance: u32,
 ) -> Result<bool> {
-    let directory = if inheritance == 0 {
-        Some(
-            OpenOptions::new()
-                .access_mode(MAXIMUM_ALLOWED)
-                .share_mode(FILE_SHARE_READ | FILE_SHARE_WRITE | FILE_SHARE_DELETE)
-                .custom_flags(FILE_FLAG_BACKUP_SEMANTICS)
-                .open(path)
-                .context("open ACL target for root-only update")?,
-        )
+    // Root-only file grants can read their DACL with metadata access, then
+    // reopen the same file for ACL updates only if a change is needed. Keep
+    // the MAXIMUM_ALLOWED handle for directories: SetSecurityInfo suppresses
+    // propagation of existing inheritable ACEs only when that handle was
+    // opened with MAXIMUM_ALLOWED.
+    let root_only_handle = if inheritance == 0 {
+        let probe = OpenOptions::new()
+            .access_mode(READ_CONTROL | FILE_READ_ATTRIBUTES)
+            .share_mode(FILE_SHARE_READ | FILE_SHARE_WRITE | FILE_SHARE_DELETE)
+            .custom_flags(FILE_FLAG_BACKUP_SEMANTICS)
+            .open(path);
+        match probe {
+            Ok(handle) if handle.metadata().is_ok_and(|metadata| metadata.is_file()) => {
+                Some((handle, true))
+            }
+            Ok(handle) => {
+                drop(handle);
+                Some((
+                    OpenOptions::new()
+                        .access_mode(MAXIMUM_ALLOWED)
+                        .share_mode(FILE_SHARE_READ | FILE_SHARE_WRITE | FILE_SHARE_DELETE)
+                        .custom_flags(FILE_FLAG_BACKUP_SEMANTICS)
+                        .open(path)
+                        .context("open ACL target for root-only update")?,
+                    false,
+                ))
+            }
+            Err(_) => Some((
+                OpenOptions::new()
+                    .access_mode(MAXIMUM_ALLOWED)
+                    .share_mode(FILE_SHARE_READ | FILE_SHARE_WRITE | FILE_SHARE_DELETE)
+                    .custom_flags(FILE_FLAG_BACKUP_SEMANTICS)
+                    .open(path)
+                    .context("open ACL target for root-only update")?,
+                false,
+            )),
+        }
     } else {
         None
     };
     // A root-only grant must preserve existing permissions and deny ACEs.
-    let access_mode = if directory.is_some() {
+    let access_mode = if root_only_handle.is_some() {
         GRANT_ACCESS
     } else {
         access_mode
     };
 
-    let (p_dacl, p_sd) = match directory.as_ref() {
-        Some(directory) => {
+    let (p_dacl, p_sd) = match root_only_handle.as_ref() {
+        Some((handle, _)) => {
             let mut security_descriptor: *mut c_void = std::ptr::null_mut();
             let mut acl: *mut ACL = std::ptr::null_mut();
             let code = GetSecurityInfo(
-                directory.as_raw_handle() as HANDLE,
+                handle.as_raw_handle() as HANDLE,
                 /*objecttype*/ 1,
                 DACL_SECURITY_INFORMATION,
                 std::ptr::null_mut(),
@@ -610,7 +657,7 @@ unsafe fn ensure_allow_mask_aces_with_inheritance_impl(
             continue;
         }
         if !dacl_allow_mask_needs_refresh(p_dacl, *sid, allow_mask, disallow_mask)
-            || directory.is_some() && p_dacl.is_null()
+            || root_only_handle.is_some() && p_dacl.is_null()
         {
             continue;
         }
@@ -645,9 +692,11 @@ unsafe fn ensure_allow_mask_aces_with_inheritance_impl(
         }
         // For inheriting grants, request ACL-write access only when an update
         // is needed. Use the same long-path support as the read handle.
-        let handle = match directory {
+        let handle = match root_only_handle {
+            Some((file, true)) => reopen_acl_handle(&file, READ_CONTROL | WRITE_DAC)
+                .context("reopen root-only file ACL target for update")?,
             // MAXIMUM_ALLOWED suppresses propagation of existing inheritable ACEs too.
-            Some(directory) => directory,
+            Some((directory, false)) => directory,
             None => OpenOptions::new()
                 .access_mode(READ_CONTROL | WRITE_DAC)
                 .share_mode(FILE_SHARE_READ | FILE_SHARE_WRITE | FILE_SHARE_DELETE)
diff --git a/codex-rs/windows-sandbox-rs/src/acl_tests.rs b/codex-rs/windows-sandbox-rs/src/acl_tests.rs
index 44a1cd9..de0bbca 100644
--- a/codex-rs/windows-sandbox-rs/src/acl_tests.rs
+++ b/codex-rs/windows-sandbox-rs/src/acl_tests.rs
@@ -3,6 +3,7 @@ use super::deny_ace_already_present;
 use super::ensure_allow_mask_aces_with_inheritance;
 use super::ensure_handle_is_not_filesystem_root;
 use super::fetch_dacl_handle;
+use super::path_mask_allows;
 use crate::token::LocalSid;
 use crate::winutil::to_wide;
 use pretty_assertions::assert_eq;
@@ -11,6 +12,7 @@ use std::fs::OpenOptions;
 use std::os::windows::fs::OpenOptionsExt;
 use std::path::Path;
 use windows_sys::Win32::Foundation::ERROR_ACCESS_DENIED;
+use windows_sys::Win32::Foundation::ERROR_SHARING_VIOLATION;
 use windows_sys::Win32::Foundation::HLOCAL;
 use windows_sys::Win32::Foundation::LocalFree;
 use windows_sys::Win32::Security::ACL_SIZE_INFORMATION;
@@ -24,8 +26,15 @@ use windows_sys::Win32::Security::SE_DACL_PROTECTED;
 use windows_sys::Win32::Security::SetFileSecurityW;
 use windows_sys::Win32::Security::UNPROTECTED_DACL_SECURITY_INFORMATION;
 use windows_sys::Win32::Storage::FileSystem::FILE_FLAG_BACKUP_SEMANTICS;
+use windows_sys::Win32::Storage::FileSystem::FILE_GENERIC_EXECUTE;
+use windows_sys::Win32::Storage::FileSystem::FILE_GENERIC_READ;
+use windows_sys::Win32::Storage::FileSystem::FILE_GENERIC_WRITE;
 use windows_sys::Win32::Storage::FileSystem::FILE_READ_ATTRIBUTES;
+use windows_sys::Win32::Storage::FileSystem::FILE_SHARE_DELETE;
+use windows_sys::Win32::Storage::FileSystem::FILE_SHARE_READ;
+use windows_sys::Win32::Storage::FileSystem::FILE_SHARE_WRITE;
 use windows_sys::Win32::Storage::FileSystem::READ_CONTROL;
+use windows_sys::Win32::System::SystemServices::MAXIMUM_ALLOWED;
 
 #[test]
 fn deny_ace_update_failure_is_an_error() {
@@ -194,4 +203,192 @@ fn noninheriting_read_attributes_preserve_unprotected_child_dacl() {
         .unwrap()
     });
     assert_eq!(acl_snapshot(&child), before);
+
+    let future_child = parent.path().join("future_child");
+    std::fs::create_dir(&future_child).expect("create future child");
+    assert!(
+        path_mask_allows(
+            &future_child,
+            &[marker.as_ptr()],
+            FILE_READ_ATTRIBUTES,
+            /*require_all_bits*/ true,
+        )
+        .expect("future child inherits the original parent ACE")
+    );
+    assert!(
+        !path_mask_allows(
+            &future_child,
+            &[target.as_ptr()],
+            FILE_READ_ATTRIBUTES,
+            /*require_all_bits*/ true,
+        )
+        .expect("root-only ACE stays on the parent")
+    );
+}
+
+#[test]
+fn root_only_file_read_execute_update_works_while_content_write_is_denied() {
+    let target = tempfile::NamedTempFile::new().expect("create temporary file");
+    let path = target.into_temp_path();
+    let original_contents = b"runtime image bytes";
+    std::fs::write(&path, original_contents).expect("write temporary contents");
+    let sid = LocalSid::from_string("S-1-5-21-10-20-30-50").expect("test SID");
+
+    let content_read_handle = OpenOptions::new()
+        .access_mode(FILE_GENERIC_READ)
+        .share_mode(FILE_SHARE_READ | FILE_SHARE_DELETE)
+        .open(&path)
+        .expect("hold a content-read handle that denies content writes");
+    let content_write = OpenOptions::new()
+        .access_mode(FILE_GENERIC_WRITE)
+        .share_mode(FILE_SHARE_READ | FILE_SHARE_WRITE | FILE_SHARE_DELETE)
+        .open(&path)
+        .expect_err("the existing handle must deny content writes");
+    assert_eq!(
+        content_write.raw_os_error(),
+        Some(ERROR_SHARING_VIOLATION as i32),
+        "the fixture must exercise a sharing violation"
+    );
+    let max_allowed = OpenOptions::new()
+        .access_mode(MAXIMUM_ALLOWED)
+        .share_mode(FILE_SHARE_READ | FILE_SHARE_WRITE | FILE_SHARE_DELETE)
+        .custom_flags(FILE_FLAG_BACKUP_SEMANTICS)
+        .open(&path)
+        .expect_err("MAXIMUM_ALLOWED must hit the same sharing violation");
+    assert_eq!(
+        max_allowed.raw_os_error(),
+        Some(ERROR_SHARING_VIOLATION as i32),
+        "the fixture must reproduce the helper's exact access request"
+    );
+
+    let read_execute_mask = FILE_GENERIC_READ | FILE_GENERIC_EXECUTE;
+    assert!(
+        unsafe {
+            ensure_allow_mask_aces_with_inheritance(
+                &path,
+                &[sid.as_ptr()],
+                read_execute_mask,
+                /*inheritance*/ 0,
+            )
+        }
+        .expect("add root-only RX while content writes are denied")
+    );
+    assert!(
+        path_mask_allows(
+            &path,
+            &[sid.as_ptr()],
+            read_execute_mask,
+            /*require_all_bits*/ true,
+        )
+        .expect("read the updated ACL")
+    );
+    assert_eq!(
+        std::fs::read(&path).expect("read unchanged runtime contents"),
+        original_contents
+    );
+    drop(content_read_handle);
+}
+
+#[test]
+fn root_only_file_read_execute_does_not_override_an_existing_deny() {
+    let target = tempfile::NamedTempFile::new().expect("create temporary file");
+    let path = target.into_temp_path();
+    let sid = LocalSid::from_string("S-1-5-21-10-20-30-51").expect("test SID");
+
+    assert!(
+        unsafe { super::add_deny_read_ace(&path, sid.as_ptr()) }.expect("add existing read deny")
+    );
+    let content_read_handle = OpenOptions::new()
+        .access_mode(FILE_GENERIC_READ)
+        .share_mode(FILE_SHARE_READ | FILE_SHARE_DELETE)
+        .open(&path)
+        .expect("hold a content-read handle that denies content writes");
+
+    assert!(
+        !unsafe {
+            ensure_allow_mask_aces_with_inheritance(
+                &path,
+                &[sid.as_ptr()],
+                FILE_GENERIC_READ | FILE_GENERIC_EXECUTE,
+                /*inheritance*/ 0,
+            )
+        }
+        .expect("a deny must remain authoritative")
+    );
+    assert!(
+        !path_mask_allows(
+            &path,
+            &[sid.as_ptr()],
+            FILE_GENERIC_READ | FILE_GENERIC_EXECUTE,
+            /*require_all_bits*/ true,
+        )
+        .expect("read the unchanged deny ACL")
+    );
+    drop(content_read_handle);
+}
+
+#[test]
+fn root_only_noop_with_read_metadata_rights_does_not_require_write_dac() {
+    let target = tempfile::NamedTempFile::new().expect("create temporary file");
+    let sid = LocalSid::from_string("S-1-5-21-10-20-30-52").expect("test SID");
+    let sddl = format!("D:P(A;;0x00120080;;;OW)(A;;GRGX;;;S-1-5-21-10-20-30-52)");
+    let mut descriptor = std::ptr::null_mut();
+    assert_ne!(
+        unsafe {
+            ConvertStringSecurityDescriptorToSecurityDescriptorW(
+                to_wide(&sddl).as_ptr(),
+                SDDL_REVISION_1,
+                &mut descriptor,
+                std::ptr::null_mut(),
+            )
+        },
+        0,
+        "create an owner-rights read-only DACL"
+    );
+    assert_ne!(
+        unsafe {
+            SetFileSecurityW(
+                to_wide(target.path()).as_ptr(),
+                DACL_SECURITY_INFORMATION,
+                descriptor,
+            )
+        },
+        0,
+        "restrict the owner to metadata-read rights without WRITE_DAC or content read"
+    );
+    unsafe { LocalFree(descriptor as HLOCAL) };
+
+    assert!(
+        !unsafe {
+            ensure_allow_mask_aces_with_inheritance(
+                target.path(),
+                &[sid.as_ptr()],
+                FILE_GENERIC_READ | FILE_GENERIC_EXECUTE,
+                /*inheritance*/ 0,
+            )
+        }
+        .expect("already-satisfied root-only ACE needs only read access")
+    );
+}
+
+#[test]
+fn root_only_missing_path_remains_not_found() {
+    let parent = tempfile::tempdir().expect("create temporary directory");
+    let missing = parent.path().join("missing-file");
+    let sid = LocalSid::from_string("S-1-5-21-10-20-30-53").expect("test SID");
+
+    let error = unsafe {
+        ensure_allow_mask_aces_with_inheritance(
+            &missing,
+            &[sid.as_ptr()],
+            FILE_GENERIC_READ | FILE_GENERIC_EXECUTE,
+            /*inheritance*/ 0,
+        )
+    }
+    .expect_err("a missing target must remain an error");
+    let io_error = error
+        .chain()
+        .find_map(|cause| cause.downcast_ref::<std::io::Error>())
+        .expect("preserve the operating-system error");
+    assert_eq!(io_error.kind(), std::io::ErrorKind::NotFound);
 }

Patch SHA-256: A6E00FB8F055609C480EE2BCF14F8203BF30D948AD22A0E9612AE55DBC9020A8

zhangcheng380016 avatar Oct 07 '26 11:10 zhangcheng380016

Additional affected Windows installation, reported at the user's explicit request. The observations below were collected locally on October 7, 2026.

Environment

  • Desktop updater reports app version 26.1002.51308, build 13417, prod channel.
  • Observed Windows package path: OpenAI.Codex_26.1002.6548.0_x64.
  • Bundled CLI: codex-cli 0.162.0-alpha.2, verified with --version.
  • OS version reported by .NET: Microsoft Windows NT 10.0.26200.0.
  • Helper directory: 979a96ce184041d1; runtime: cua_node\\2c9e75c4e9c71beb.

Failure and reboot verification

With windows.sandbox = "elevated", even an ordinary desktop-agent Get-Location or file-read command fails before the requested command starts:

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

The fatal sandbox log identifies:

runtime read/execute validation failed:
validate runtime read/execute access on
%LOCALAPPDATA%\OpenAI\Codex\runtimes\cua_node\2c9e75c4e9c71beb\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)

The localized error text above is translated from Chinese. A separate user-profile warning says continuing setup; runtime-file validation is the fatal entry.

A full Windows reboot was independently verified: boot time was 19:14:35 UTC+08:00, and the subsequent 19:16:10 sandbox log again recorded the same fatal error. New node_repl.exe processes had started after reboot.

Read-only permission probes

  • The failing file is owned by the interactive user.
  • CodexSandboxUsers already has ReadAndExecute, Synchronize on it.
  • CreateFileW probes using READ_CONTROL, WRITE_DAC, their combination, or FILE_READ_ATTRIBUTES all succeeded with share flags 1, 3, and 7. Each handle was immediately closed; these probes did not change file contents or ACLs.
  • These probes do not reproduce the helper's exact token, flags, or timing. No MAXIMUM_ALLOWED comparison was performed on this installation, so the code-level cause is not independently established here.

Verified fallback and isolated elevated retest

After backing up the configuration, changing only windows.sandbox to "unelevated", and restarting the desktop app:

  • An actual agent Get-Location succeeded.
  • Workspace file creation, readback, and deletion succeeded.
  • The temporary test file was removed.

A later isolated test using the same bundled executable, launched from a separately approved outside-sandbox context, still failed:

codex.exe sandbox -c 'windows.sandbox="elevated"' -- C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -NoProfile -Command Get-Location

Result: exit code 1, helper_unknown_error: setup refresh had errors. This override applied only to that invocation; the persistent configuration remains unelevated.

Please identify a fixed, officially distributed desktop/runtime build or supported recovery procedure that restores elevated isolation while preserving local history and configuration. No private paths, authentication files, full session transcripts, or sandbox secrets are included in this report.

0zxcvbn avatar Oct 07 '26 12:10 0zxcvbn

The failing file in my sandbox logs is node_repl.exe.

Windows Restart Manager confirmed that Codex-owned processes were using this executable during setup refresh.

Reading the file and opening an ACL-access handle succeeds, but opening a content read/write handle fails with Windows error 32.

This suggests a file-access conflict during runtime ACL validation. The exact implementation cause remains unconfirmed.

Hendra827 avatar Oct 07 '26 12:10 Hendra827

I am still seeing setup refresh had errors on Windows after updating to package version 26.1002.7124.0 (previously 26.1002.6548.0).

The separate problem where new Work conversations could not send their first message has recovered on my installation. However, a local task delegated by dot still cannot execute commands:

  • The computer is reported as connected and the local task accepts the message.
  • At 2026-10-07 12:24:12 UTC, a minimal read-only Get-Location check failed before execution with:
exec_command failed: CreateProcess { message: "Rejected(\"Failed to create unified exec process: exec-server rejected request (-32603): helper_unknown_error: setup refresh had errors\")" }

The check stopped after this failure; no configuration, permissions, or files were changed. This confirms a local command-execution failure in this workflow, not that every type of local operation is unavailable. I have not obtained sandbox logs to verify whether the underlying cause is the same sharing violation described in this issue.

Could you confirm whether the Windows command-execution fix is separate from the Work composer fix, and advise on a supported recovery that preserves existing files and settings?

weijiayua11y avatar Oct 07 '26 12:10 weijiayua11y