Skip to content

[codex] Fix Windows sandbox runtime ACL refresh#28943

Merged
iceweasel-oai merged 2 commits into
mainfrom
fix/windows-sandbox-runtime-read-acl-28084
Jun 18, 2026
Merged

[codex] Fix Windows sandbox runtime ACL refresh#28943
iceweasel-oai merged 2 commits into
mainfrom
fix/windows-sandbox-runtime-read-acl-28084

Conversation

@iceweasel-oai

@iceweasel-oai iceweasel-oai commented Jun 18, 2026

Copy link
Copy Markdown
Collaborator

Why

Codex Desktop repairs sandbox-user read/execute access for binaries copied to %LOCALAPPDATA%\OpenAI\Codex\bin, but Computer Use launches its bundled Node runtime from %LOCALAPPDATA%\OpenAI\Codex\runtimes.

On fresh Windows installations, CodexSandboxUsers may therefore be unable to execute the bundled Node binary. The command runner starts, but CreateProcessAsUserW fails with error 5 (ACCESS_DENIED), causing the Node REPL to exit before Computer Use can discover applications.

This is a follow-up to #21564, which added the original runtime bin ACL repair.

What changed

  • Expand the Codex Desktop runtime ACL roots from only bin to both bin and runtimes.
  • Apply the existing inherited read/execute ACL repair to each runtime directory when it exists.
  • Rename the setup helper to reflect that it now handles multiple runtime paths.

Validation

  • cargo fmt -- --check
  • just test -p codex-windows-sandbox was run: 113 tests passed and five environment-dependent legacy execution tests failed because CreateRestrictedToken returned error 87.

@iceweasel-oai iceweasel-oai marked this pull request as ready for review June 18, 2026 17:33

@zm-oai zm-oai left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yay!

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 11fc8e1dfd

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread codex-rs/windows-sandbox-rs/src/bin/setup_main/win/setup_runtime_bin.rs Outdated
@iceweasel-oai iceweasel-oai merged commit afbb69a into main Jun 18, 2026
46 of 47 checks passed
@iceweasel-oai iceweasel-oai deleted the fix/windows-sandbox-runtime-read-acl-28084 branch June 18, 2026 18:04
@github-actions github-actions Bot locked and limited conversation to collaborators Jun 18, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants