Skip to content

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

Open

Description

@i-schuyler

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

Activity

  1. added
    CLIIssues related to the Codex CLI
    windows-osIssues related to Codex on Windows systems
    sandboxIssues related to permissions or sandboxing
    on Mar 11, 2026
  2. github-actions commented on Mar 11, 2026

    @github-actions
    Contributor

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

    Powered by Codex Action

  3. Shubender commented on Mar 12, 2026

    @Shubender

    The same problem in VS Code and Codex App.

  4. GitMurf commented on Mar 20, 2026

    @GitMurf

    @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: #14675 (comment)

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

  5. GitMurf commented on Mar 20, 2026

    @GitMurf

    @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: #14675 (comment)

  6. Shubender commented on Mar 26, 2026

    @Shubender

    @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.
    
  7. notnotype commented on Apr 3, 2026

    @notnotype

    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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingsandboxIssues related to permissions or sandboxingwindows-osIssues related to Codex on Windows systems

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions