Skip to content

[codex] Grant Windows sandbox access to primary runtime - #31574

Merged
abhinav-oai merged 1 commit into
mainfrom
codex/fix-windows-primary-runtime-acl
Jul 8, 2026
Merged

[codex] Grant Windows sandbox access to primary runtime#31574
abhinav-oai merged 1 commit into
mainfrom
codex/fix-windows-primary-runtime-acl

Conversation

@abhinav-oai

Copy link
Copy Markdown
Contributor

Why

Codex Desktop installs its managed primary runtime under %USERPROFILE%\.cache\codex-runtimes. Elevated Windows sandbox commands run as dedicated sandbox users. The synchronous runtime ACL refresh repairs read/execute access for the Desktop runtime directories under %LOCALAPPDATA%\OpenAI\Codex, but did not include the managed primary runtime cache.

As a result, the Desktop app could discover a bundled runtime while a sandboxed command received ACCESS_DENIED when reading or executing it.

What changed

  • Include %USERPROFILE%\.cache\codex-runtimes in the managed runtime paths considered by the Windows sandbox ACL refresh.
  • Reuse the existing inherited read/execute ACL repair; no write permission is added.
  • Add Windows-target regression coverage for the runtime path list and the primary-runtime-only case.

Impact

Bundled Python, Node, and native tools remain usable from elevated Windows sandbox sessions without broadening write access or granting access to the rest of the user profile.

Validation

  • just fmt
  • just test -p codex-windows-sandbox (10/10 host-side tests passed)
  • Windows-target path tests included for CI

@abhinav-oai
abhinav-oai marked this pull request as ready for review July 8, 2026 12:58
@abhinav-oai
abhinav-oai merged commit c6b124b into main Jul 8, 2026
35 checks passed
@abhinav-oai
abhinav-oai deleted the codex/fix-windows-primary-runtime-acl branch July 8, 2026 20:22
@github-actions github-actions Bot locked and limited conversation to collaborators Jul 8, 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