openai / openai/codex

CLI 0.155.x: Windows sandbox fails for a non-admin user (sandbox users missing or incompatible with marker version); 0.154.0 works

Open
#46,515 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug CLI sandbox windows-os
Dominant language
Rust
Stars
125k
Forks
19.4k
PR merge metrics
PR metrics pending

Description

What version of Codex CLI is running?

0.155.1 (also reproduced on 0.155.0). 0.154.0 works on the same machine.

What subscription do you have?

ChatGPT (plan not relevant to the failure; the sandbox fails before any request is made).

Which model were you using?

n/a — the failure happens before any model call. codex sandbox -- cmd /c echo ok is enough to reproduce.

What platform is your computer?

Microsoft Windows NT 10.0.26200.0 x64 (Windows 11 Enterprise, domain-joined, CrowdStrike Falcon present). The user account is a standard (non-administrator) domain account. Node v22.20.0, npm 10.9.3, install via npm install -g @openai/codex.

What terminal emulator and version are you using (if applicable)?

PowerShell 7 and Windows PowerShell 5.1, both in Windows Terminal; also reproduced when the CLI is launched non-interactively by a wrapper script (codex exec).

Codex doctor report

Relevant lines from codex doctor on 0.155.1 (full JSON available on request):

Codex Doctor v0.155.1 · windows-x86_64
   ⚠ sandbox      filesystem unrestricted · network enabled
   ⚠ security     CrowdStrike Falcon can interfere with Codex. Verify Codex exclusions.
   ✗ sandbox      elevated Windows sandbox provisioning recorded a structured failure
      os                       Windows 10.0.26200 (Windows 11 Enterprise) [64-bit]
      version                  0.155.1
      install method           npm
What issue are you seeing?

Since 0.155.0, every command execution on this machine fails at the first shell call, including the trivial sandbox probe:

> codex sandbox -- cmd /c echo ok
windows sandbox failed: helper_unknown_error: setup refresh had errors

codex exec fails the same way on its first tool call, so the agent never runs anything. %USERPROFILE%\.codex\.sandbox\sandbox.<date>.log shows the cause on every launch:

[codex.exe] helper launch resolution: using copied command-runner path %USERPROFILE%\.codex\.sandbox-bin\codex-command-runner-0.151.0-alpha.7.2.exe
[codex.exe] sandbox setup required: sandbox users missing or incompatible with marker version

Two things make this different from the existing "setup refresh had errors" reports (#43416, #42513, #41715, #44425), which are mostly about the desktop app:

  1. It is a clean regression between CLI 0.154.0 and 0.155.0. npm install -g @openai/codex@0.154.0 restores a working sandbox immediately (codex sandbox -- cmd /c echo ok prints ok, codex exec runs to completion). npm install -g @openai/codex@0.155.0 or @0.155.1 breaks it again, with no other change to the machine. We have flipped between the two versions several times today with the same result each time.
  2. A standard user cannot recover. The marker mismatch asks for the elevated sandbox re-provisioning, which raises a UAC credential prompt for a domain administrator the user is not. On 0.154.0 the CLI still fell back to the unelevated sandbox and worked. On 0.155.x there appears to be no non-elevated path at all, so a non-admin user is locked out of the CLI entirely. Running the elevated setup once through a separate, elevated context did complete (codex-windows-sandbox-setup.exe ... setup refresh: processed 2 write roots (read roots delegated); errors=[] / setup binary completed), yet the very next unelevated codex.exe launch still logs sandbox setup required: sandbox users missing or incompatible with marker version. So either the elevated setup writes a marker the 0.155.1 CLI does not accept, or the check runs against a different marker than the setup binary updates.
What steps can reproduce the bug?

On a Windows 11 machine where the user is not a local administrator:

npm install -g @openai/codex@0.154.0
codex sandbox -- cmd /c echo ok      # prints: ok
npm install -g @openai/codex@0.155.1
codex sandbox -- cmd /c echo ok      # prints: windows sandbox failed: helper_unknown_error: setup refresh had errors
Get-Content "$env:USERPROFILE\.codex\.sandbox\sandbox.$(Get-Date -Format yyyy-MM-dd).log" -Tail 5
# ... sandbox setup required: sandbox users missing or incompatible with marker version
What is the expected behavior?

Either the CLI keeps working for a standard user on 0.155.x the way 0.154.0 does (an unelevated sandbox path, or a provisioning step that does not require local administrator rights), or the elevated setup that does complete leaves a marker the current CLI accepts, so that one administrator-assisted provisioning unlocks the CLI for the standard user.

Additional information
  • Rolling back with npm install -g @openai/codex@0.154.0 is the only workaround found. It is fragile because the package updates itself back to 0.155.x between sessions.
  • codex doctor on 0.155.1 flags the failure as "elevated Windows sandbox provisioning recorded a structured failure", which matches the log.
  • CrowdStrike Falcon is present but was equally present when 0.154.0 worked, so it does not look like the cause here.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the Windows sandbox provisioning and marker check reached by codex sandbox, then reproduce the 0.154.0-to-0.155.1 difference using the standard-user steps and sandbox logs. Compare the elevated setup result with the marker expected by the current CLI; done means a non-admin user can run codex sandbox -- cmd /c echo ok after provisioning and codex exec completes.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
cli, operating-systems, security
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
52/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.