[Windows][VS Code] Windows sandbox setup repeatedly fails after helper completion; setup_marker.json ACL workaround
What version of the IDE extension are you using?
26.818.41705
What subscription do you have?
Free
Which IDE are you using?
VS Code
What platform is your computer?
Microsoft Windows NT 10.0.26200.0 x64
What issue are you seeing?
On Windows, the OpenAI Codex VS Code extension repeatedly fails to complete
Windows sandbox setup.
The VS Code UI reports the sandbox setup as failed.
When a sandboxed command is executed, Codex reports:
sandbox setup required: sandbox setup marker missing or incompatible
The setup helper is then launched:
codex-windows-sandbox-setup.exe
The helper log reports that the helper's own setup work completes:
WFP setup succeeded for CodexSandboxOffline with 12 installed filters
codex-windows-sandbox-setup.exe] setup binary completed
read-acl-only mode: applying read ACLs
read ACL run completed
However, the overall setup is still reported as failed by Codex/the VS Code UI,
and the next sandboxed command immediately reports the samesandbox setup required message and starts the setup helper again.
For example:
16:57:22.233 codex.exe
sandbox setup required: sandbox setup marker missing or incompatible
16:57:25.090 codex-windows-sandbox-setup.exe
setup binary completed
16:57:25.115
read ACL run completed
16:57:26.282 codex.exe
sandbox setup required: sandbox setup marker missing or incompatible
A higher-level error also appeared:
orchestrator_helper_incomplete:
setup helper exited successfully before setup completed
This appears to be a failure in the overall setup validation/orchestration rather
than an obvious crash of the elevated helper itself.
What steps can reproduce the bug?
- Install the OpenAI Codex VS Code extension on Windows.
- Open a local workspace.
- Run a command that requires the Windows sandbox.
- Approve the UAC prompt for
codex-windows-sandbox-setup.exe. - Observe that the helper reaches
setup binary completedand
read ACL run completed.
- Run another sandboxed command.
- Observe:
sandbox setup required: sandbox setup marker missing or incompatible
- Observe that
codex-windows-sandbox-setup.exeis launched again. - Repeat the command and observe the same cycle.
The VS Code extension launches the bundled Codex CLI as:
codex.exe -c features.code_mode_host=true app-server --analytics-default-enabled
The bundled codex.exe works normally when executed directly from the extension
directory.
An independently installed Codex CLI also works normally.
This makes the VS Code Extension/app-server sandbox setup path the main
distinguishing factor in this reproduction.
What is the expected behavior?
After the elevated sandbox setup completes, Codex should accept the resulting
sandbox state as valid and reuse it for subsequent sandboxed commands.
The user should not receive repeated UAC/setup requests for every command.
If validation fails because the marker cannot be accessed, Codex should report a
specific ACL/permission error rather than treating the marker as simply
"missing or incompatible".
Additional information
Sandbox state
The following files exist:
%USERPROFILE%\.codex\.sandbox\setup_marker.json
%USERPROFILE%\.codex\.sandbox-secrets\sandbox_users.json
Both contain version: 5.
The sandbox users exist and are enabled:
CodexSandboxOffline
CodexSandboxOnline
Both are members of:
CodexSandboxUsers
The setup log also reports successful WFP configuration.
Workaround
In my environment, explicitly granting the current Windows user's SID
Full Control on setup_marker.json stopped the repeated setup cycle:
$marker = "$env:USERPROFILE\.codex\.sandbox\setup_marker.json"
$sid = (Get-LocalUser -Name $env:USERNAME).SID.Value
icacls $marker /grant "*${sid}:F"
The current user's SID was:
S-1-5-21-4260286667-2968846849-2356761996-1001
After this change, sandboxed commands began working normally without repeatedly
launching codex-windows-sandbox-setup.exe.
I am reporting this as a confirmed workaround in my environment, not as a
definitive determination of the underlying root cause.
Control tests
- Independently installed Codex CLI: works normally.
- Bundled
codex.exeexecuted directly from the VS Code extension directory:
works normally.
- VS Code Codex extension using its
app-serverpath:
reproduces the sandbox setup loop.
Questions
Could you confirm:
- Whether
setup_marker.jsonis expected to grant access to the interactive
Windows user's SID during sandbox setup.
- Why the normal Codex process can reject the marker immediately after the
elevated helper reports completion.
- Whether there is a known SID/account-resolution or ACL issue in the Windows
sandbox setup path.
- Whether the VS Code
app-serverpath has any additional sandbox setup
behavior compared with direct CLI execution.
Related issues
This appears related to:
- #30445 — Windows sandbox setup marker ACL prevents Codex from starting
sandbox after UAC setup
- #35407 — Windows Desktop repeatedly runs elevated sandbox setup
The present report is specifically reproduced with the VS Code extension and
its app-server execution path.
AI-assisted disclosure
This issue report was prepared with assistance from an AI language model.
All logs, reproduction steps, system information, and the reported workaround
were personally observed and verified on my system. The AI was used to help
organize and summarize the findings.
Please independently verify the technical conclusions against the provided
evidence.
1 Comment
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action