External Publication
Visit Post

Codex CLI on Windows update fails

OpenAI Developer Community May 20, 2026
Source

Thanks for the update. I use Codex on Windows as well, which makes us part of a fairly rare group.

I haven’t upgraded my version yet today, and since I use the VS Code extension, I’ll keep an eye out for any errors.

I also checked the Codex issues page, and some of the recently reported problems appear to be related to Windows updates, so I’ll be keeping those in mind as well.


Does this issue appear to be the same?

github.com/openai/codex

Windows sandbox setup refresh failure on v0.131.0

opened 12:49AM - 20 May 26 UTC

      takusteelfish-web
    

bug windows-os sandbox app

Codex Windows sandbox setup refresh failure on v0.131.0 Date: 2026-05-20 ## …Summary After updating to OpenAI Codex v0.131.0 on Windows, all non-escalated shell commands failed before the command process started. The failure message was: text windows sandbox: setup refresh failed with status exit code: 1 The issue was reproduced both in an existing workspace and in a newly created empty workspace. The same command succeeded when explicitly approved to run outside the sandbox. After changing Windows sandbox-related settings and fully restarting Codex, the original pre-execution failure was no longer reproduced. Non-escalated shell commands now run, but PowerShell still emits a language mode-related InvalidOperation message before command output. Current status: mitigated, with a remaining warning. ## Environment - Codex version: OpenAI Codex v0.131.0 - Model: gpt-5.5 - Platform: Windows - Windows version: 25H2 (OS Build 26200.8457) - Shell: PowerShell - PowerShell version: 7.6.0 - Sandbox mode: workspace-write - Main workspace: C:\Users\taku_\Documents\radiology-ops - Main workspace shown by Codex: ~\Documents\radiology-ops - Empty test workspace: ~\Documents\codex-sandbox-test ## Impact The failure blocked ordinary local repository inspection and normal workflow execution. In the affected workspace, Codex could not safely run even simple read-only commands needed to inspect local workflow files such as: - tools/prompts/daily-schedule-workflow.md - DAILY.md - 00_context/local/calendar_ids.json Because the failure occurred during sandbox setup or refresh, it was not specific to a particular command, file path, or repository. ## Original Reproduction In Codex on Windows, run a simple non-escalated shell command: powershell $PSVersionTable.PSVersion Observed result: text execution error: Io(Custom { kind: Other, error: "windows sandbox: setup refresh failed with status exit code: 1" }) The same error occurred with: - workdir set to C:\Users\taku_\Documents\radiology-ops - no explicit workdir - workdir set to C:\Users\taku_\\.codex\memories - a new empty workspace at ~\Documents\codex-sandbox-test In the new empty workspace, the same command succeeded when the user explicitly approved running it outside the sandbox: text Major Minor Patch PreReleaseLabel BuildLabel ----- ----- ----- --------------- ---------- 7 6 0 ## Expected Behavior Simple read-only shell commands should execute normally inside the workspace sandbox. If a command fails, the failure should come from the command itself, not from Windows sandbox setup before execution. ## Original Observed Behavior The command did not appear to start. The failure happened during Windows sandbox setup or refresh, before PowerShell command execution. ## Things Tried Before Mitigation - Restarted the Codex app completely. - Retried the same simple command after restart. - Tried the command with different working directory settings. - Confirmed the error was not specific to Get-Content, daily-schedule-workflow.md, DAILY.md, or the repository path. - Confirmed the same error occurred in a new empty workspace. - Confirmed the same command succeeded outside the sandbox after explicit user approval. ## Mitigation Attempted The likely mitigation was changing Windows sandbox-related settings and then fully restarting Codex. The candidate setting change was: toml [windows] sandbox = "unelevated" or the equivalent UI setting: - Elevated Windows sandbox: off - Windows sandbox: unelevated The exact before and after values were not captured in the final pasted result, so the mitigation cannot yet be attributed definitively to one specific setting. The timing strongly suggests that the Windows sandbox setting change plus full Codex restart resolved or bypassed the setup refresh failure. Broad PowerShell allow rules and disabling the sandbox permanently were intentionally avoided. ## Post-Restart Result User-provided result after the setting change and full Codex restart: text Command: $PSVersionTable.PSVersion Result: command completed and printed PowerShell version 7.6.0 Additional stderr/stdout: InvalidOperation: Cannot set property. Property setting is supported only on core types in this language mode. Codex also verified the same minimal read-only command in the radiology-ops workspace: text Workspace: C:\Users\taku_\Documents\radiology-ops Command: $PSVersionTable.PSVersion Exit code: 0 Output: InvalidOperation: Cannot set property. Property setting is supported only on core types in this language mode. Major Minor Patch PreReleaseLabel BuildLabel ----- ----- ----- --------------- ---------- 7 6 0 ## Current Interpretation The original blocker appears to be mitigated: - The previous error, windows sandbox: setup refresh failed with status exit code: 1, no longer appears in the tested session. - The non-escalated command now starts and exits successfully inside the sandbox. - The command output is available. A separate warning remains: text InvalidOperation: Cannot set property. Property setting is supported only on core types in this language mode. This appears to be a different symptom from the original sandbox setup/refresh failure. It may be related to PowerShell language mode or shell initialization inside the sandbox. For the minimal command tested here, it did not prevent execution or output collection. ## Related Public Issues Related issues already checked during triage: - https://github.com/openai/codex/issues/15809 - https://github.com/openai/codex/issues/10090 - https://github.com/openai/codex/issues/9062 - https://github.com/openai/codex/issues/14409 No confirmed official fix was identified during the prior investigation. Similar reports suggested trying the unelevated Windows sandbox setting, re-running sandbox onboarding, or rolling back/reinstalling if the problem persists. ## Recommended Next Steps For local operation: - Continue using the least-permissive Windows sandbox setting that allows non-escalated shell commands to run. - Do not use broad PowerShell allow rules. - Do not permanently disable the sandbox unless there is no other temporary workaround. - Treat the remaining PowerShell language mode warning as a separate, lower-priority issue unless it starts breaking real commands. If reporting upstream: - Include the original failure message. - Include both workspaces where the issue reproduced. - Include that outside-sandbox approved execution succeeded. - Include the post-restart mitigation result and the remaining language mode warning. - Add exact Windows sandbox setting values before and after if they can be recovered from UI history or user notes. If the setup refresh failure returns: 1. Try Windows sandbox re-onboarding. 2. If that fails, consider rollback or reinstall. 3. If still reproducible, file or update an official GitHub issue with this report.

Discussion in the ATmosphere

Loading comments...