windows sandbox: setup refresh failed with status exit code: 1

Open 💬 6 comments Opened Mar 11, 2026 by i-schuyler
💡 Likely answer: A maintainer (github-actions[bot], contributor) responded on this thread — see the highlighted reply below.

What version of Codex CLI is running?

0.114.0

What subscription do you have?

ChatGPT Plus

Which model were you using?

gpt-5.4, gpt-5.3-codex

What platform is your computer?

Microsoft Windows NT 10.0.26200.0 x64

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

VSCode, PowerShell

What issue are you seeing?

Codex continues to hit the Sandbox error while running reads and writes to project directories at C:\ActiveWorkspace\EV Conversion Project\Software\ev-autopilot

I have been having intermittent issues with this with codex CLI versions: 0.95, 0.97, 0.100, 0.111, 0.113, 0.114

I have tried running codex --full-auto which did not help

What steps can reproduce the bug?

Uploaded threads:
019cdf3c-d627-77f1-9e94-bf0e05bd806e
019cdf1f-86e2-7a32-ab46-3b7e3dfc4e6f

What is the expected behavior?

_No response_

Additional information

My config.toml:
model = "gpt-5.4"
model_reasoning_effort = "high"

approval_policy = "untrusted"
sandbox_mode = "workspace-write"

[projects.'C:\ActiveWorkspace\esp32-nfc-security-system']
trust_level = "trusted"

[projects.'C:\ActiveWorkspace\EV Conversion Project\Software\ev-autopilot']
trust_level = "trusted"

[windows]
sandbox = "elevated"

[notice.model_migrations]
"gpt-5.2-codex" = "gpt-5.3-codex"

[features]
elevated_windows_sandbox = true
unified_exec = false

View original on GitHub ↗

6 Comments

github-actions[bot] contributor · 4 months ago

Potential duplicates detected. Please review them and close your issue if it is a duplicate.

  • #13378

Powered by Codex Action

Shubender · 4 months ago

The same problem in VS Code and Codex App.

GitMurf · 4 months ago

@i-schuyler I have had same issues on Codex App for Windows! For what its worth, the only "workaround" / fix for now is using the Codex CLI directly and rolling back to v0.113. See my comment here in another similar gh issue: https://github.com/openai/codex/issues/14675#issuecomment-4092786776

Can't use the Codex App or the VScode extension, but can at least use the Codex CLI directly for now.

GitMurf · 4 months ago

@i-schuyler @Shubender I was able to get a little further in debugging the issue. Here is a workaround that should work with current version of Codex: https://github.com/openai/codex/issues/14675#issuecomment-4101350142

Shubender · 3 months ago

@GitMurf thanks for your comment and solution. I came up with a solution that wasn't exactly the smartest, but it saved me from errors and unnecessary queries - I simply “asked” it not to use apply_patch in AGENTS.md

## Editing policy

Absolute rule: never use `apply_patch`, `apply_patch`-like tools, or any internal file-editing tool.

Never use any tool or workflow that may invoke sandboxed editing, virtualized editing, or sandbox setup/refresh.

For all file modifications, use shell-only editing commands such as PowerShell `Get-Content` / `Set-Content` / .NET file APIs.

If any edit tool fails with a sandbox-related error, do not retry it and do not use any internal editing tool again in that turn.
notnotype · 3 months ago

On Windows, sandboxed file edits fail with:

windows sandbox: helper_firewall_rule_create_or_add_failed: SetRemoteAddresses failed: Error { code: HRESULT(0x80070057), message: "参数错误。" }

What I verified:

  • BFE and MpsSvc are running
  • inside sandbox, Get-NetFirewallProfile / New-NetFirewallRule return access denied
  • outside sandbox (elevated), Get-NetFirewallProfile works
  • outside sandbox (elevated), creating/removing a temporary firewall rule works

This suggests Windows Firewall itself is healthy, and the failure is specific to Codex's Windows sandbox helper when configuring firewall rules.