Skip to content

Windows sandbox fails with helper_unknown_error: setup refresh had errors #48979

Open

Description

@qaziayaz298-stack

What version of the Codex App are you using (From “About Codex” dialog)?

Powered by Codex & OWL Version 26.924.22138 Released 26 Sept 2026 © OpenAI

What subscription do you have?

Plus

What platform is your computer?

Microsoft Windows NT 10.0.19045.0 x64

What issue are you seeing?

Feedback ID: 01a0be8b-85e5-7f13-b603-b04e3373c36c

The Codex App cannot initialize its Windows sandbox. Every local command fails with:

windows sandbox failed: helper_unknown_error: setup refresh had errors

The integrated terminal also does not open through the keyboard shortcut or the menu. Computer-use/browser-control sessions fail to start with the same Windows sandbox/helper error.

Steps to reproduce:

  1. Open an existing project or create a new task.
  2. Try to open the integrated terminal, or ask Codex to run a basic command such as Get-Location.
  3. The terminal does not open and the local execution process exits with the sandbox setup-refresh error.

Expected result:
The integrated terminal and local execution tools should start normally.

Actual result:
No terminal or local tool can start.

Troubleshooting already completed:

  • Closed and reopened the app
  • Restarted Windows
  • Used Windows App Repair
  • Fully uninstalled and reinstalled the Codex App
  • Created a new task
  • Closed and attempted to reopen the integrated terminal
  • Submitted in-app feedback and generated the Feedback ID above

The problem persists after all these steps.

What steps can reproduce the bug?

Feedback ID: 01a0be8b-85e5-7f13-b603-b04e3373c36c

What is the expected behavior?

No response

Additional information

No response

Activity

  1. added
    app
    on Sep 28, 2026
  2. added
    bug
    windows-os
    sandbox
    on Sep 28, 2026
  3. github-actions commented on Sep 28, 2026

    @github-actions
    Contributor
  4. Schwabo75 commented on Sep 28, 2026

    @Schwabo75

    I can reproduce this issue on Windows.

    In my case, terminal commands initially work, but workspace write operations are denied. After granting the requested write/network permissions, terminal execution immediately starts failing with:

    helper_unknown_error: setup refresh had errors

    The problem has reproduced after restarting Codex and reopening the workspace.

    My workspace is on a local J: drive.

    I submitted diagnostic logs through Codex feedback.

    Feedback ID: 01a0e802-2e92-7ec0-b71e-5f28ca258784

  5. Schwabo75 commented on Sep 28, 2026

    @Schwabo75

    Update: I was able to resolve the issue.

    Root cause in my case:

    • The workspace drive and workspace folder had ownership/permission inconsistencies after being moved/copied from another Windows installation.
    • The Git repositories also had different owner SIDs.
    • Codex runs Git under the CodexSandboxOffline account, which triggered Git's ownership/safety checks.
    • This resulted in the sandbox refresh failing with:
      helper_unknown_error: setup refresh had errors

    What fixed it:

    1. Changed the owner of the workspace drive and workspace folder to the current Windows user.
    2. Corrected ownership of the .git directories.
    3. Added the affected repositories as exact Git safe.directory entries.
    4. Reinstalled/reinitialized the Codex Windows app during troubleshooting.

    Current result:

    • Terminal: OK
    • Workspace write access: OK
    • Git repositories: OK
    • Sandbox error: NO

    In my case, the issue was related to Windows ownership/SIDs combined with Git safe.directory checks.

    Hopefully this helps diagnose and fix similar Windows cases.

  6. comvol-code commented on Oct 8, 2026

    @comvol-code

    Additional reproduction from a separate Windows 11 environment:

    • Codex app package: 26.1002.7124.0
    • App-reported version/build: 26.1002.52244 / 13536, production channel
    • Windows 11 26H2, build 26300.9457
    • Elevated sandbox setup was attempted once.
    • Setup refresh failed before any UAC/admin prompt with HELPER_UNKNOWN_ERROR / SETUP_REFRESH_HAD_ERRORS.
    • The documented CODEX_HOME/.sandbox/sandbox.log file was not emitted.
    • The Store package reported Status: OK; the four previously inspected allowlisted components were present, AMD64, and Authenticode-valid.
    • I did not switch to unelevated or Full Access, and did not repeat the setup attempt.

    This may share the same top-level symptom as this issue, but I have not established that ownership/SID or Git safe.directory is the cause in this environment. I have therefore not applied recursive ownership or ACL changes, and I have not copied another machine's fix.

    Could a maintainer advise a supported, minimally scoped diagnostic path when the failure occurs before UAC and sandbox.log is not created?

  7. Imawizard96 commented on Oct 9, 2026

    @Imawizard96

    I can reproduce the same failure on Codex Desktop for Windows.

    • Codex App: 26.1002.52244 (build 13536)
    • Impact: all local command execution and Computer Use/browser control fail
    • Started: October 9, 2026
    • Error: windows sandbox failed: helper_unknown_error: setup refresh had errors

    The sandbox log shows the underlying failure:

    runtime read/execute validation failed: validate runtime read/execute access on
    C:\Users\Pascal\AppData\Local\OpenAI\Codex\runtimes\cua_node\3dd31cfff853001c\bin\node_repl.exe:
    open ACL target for root-only update:
    Der Prozess kann nicht auf die Datei zugreifen, da sie von einem anderen Prozess verwendet wird.
    (os error 32)
    The issue is reproducible repeatedly. Codex starts its CUA Node runtime and then the sandbox setup fails during ACL validation of node_repl.exe.
    Already tried without success:

    • fully restarting Codex
    • restarting Windows
    • testing in a new chat
    • renaming %LOCALAPPDATA%\OpenAI\Codex\runtimes\cua_node so Codex rebuilds the runtime cache
      Resource Monitor’s handle search does not catch node_repl.exe, likely because the locking process exists only briefly. The error remains identical after the runtime rebuild.

    Update: the issue is currently resolved on my machine.

    Two things changed before the successful retest:

    1. Codex updated from 26.1002.52244 (build 13536) to 26.1007.21434 (build 13901).
    2. I added this to config.toml and restarted Codex:

    [windows]
    sandbox = "unelevated"

    Afterwards, Computer Use initialized successfully and the in-app browser could open and read a page normally. The previous node_repl.exe / os error 32 / setup refresh had errors failure did not recur.
    I cannot isolate whether the app update, the sandbox = "unelevated" setting, or their combination fixed it.
    For context, rebuilding the cua_node runtime cache alone had not resolved the issue earlier.

    Image Image
  8. EP-PBednarczyk commented on Oct 9, 2026

    @EP-PBednarczyk

    I have problem after updated 07 october 2026.
    Title: Windows desktop: terminal fails after update with helper_unknown_error: setup refresh had errors

    I use the Codex desktop app on Windows, independently of PyCharm.
    After updating Codex, terminal commands stopped working.

    Even git status --short fails before the command starts:

    exec_command failed: CreateProcess { message: "Rejected("Failed to create unified exec process: helper_unknown_error: setup refresh had errors")" }

    Restarting Windows and the Codex app did not resolve the issue.
    The terminal in PyCharm works correctly, including git status.

    The configuration contains:
    [windows]
    sandbox = "elevated"

    The supplied configuration records version 26.1002.52244.
    Last reproduction: October 9, 2026.

    Please investigate this possible regression and provide an official fix.

  9. roccordx commented on Nov 9, 2026

    @roccordx

    Codex Windows sandbox fails before PowerShell starts

    I'm experiencing the same issue with Codex Desktop on Windows.

    Error:
    CreateProcess { message: "Rejected(\"Failed to create unified exec process: helper_unknown_error: setup refresh had errors\")" }

    Environment:

    • Codex Windows app: 26.1103.4239.0
    • Windows sandbox configured as elevated (also tested unelevated)
    • PowerShell never starts, even for Get-Location

    Troubleshooting completed:

    • Restarted the Codex sandbox service.
    • Tested multiple workspaces, including a new directory owned by my Windows account with FullControl permissions.
    • Confirmed that commands work with Full Access but fail in approval-based sandbox mode.
    • Checked NTFS permissions and the Windows user token.
    • Sandbox logs previously reported ACL update failures involving WRITE_DAC and Access is denied (os error 5).

    The problem persists. Could you investigate the Windows sandbox setup/refresh failure?

    I can provide the relevant sandbox log for further diagnosis.

  10. wtigero commented on Nov 16, 2026

    @wtigero

    I reproduced this outside Craft Anything on Windows 11 x64 (build 26200) with the standalone Codex CLI 0.161.0. I ran codex exec from the same local workspace with --ignore-user-config, --ephemeral, --sandbox workspace-write, and windows.sandbox set to elevated for that invocation. I asked Codex to run Get-Location once through its built-in shell tool.

    The tool failed before PowerShell started:

    Failed to create unified exec process: helper_unknown_error: setup refresh had errors
    

    The matching sandbox log shows that runtime read/execute validation failed when opening an ACL target for a root-only update on %LOCALAPPDATA%\OpenAI\Codex\runtimes\cua_node\<runtime>\bin\node.exe. Windows reported The process cannot access the file because it is being used by another process. (os error 32). Running Get-Location directly with the same PowerShell executable in the same working directory returned exit code 0.

    The same setup-refresh error had appeared in a Craft Anything 0.6.1 Codex build. A separate standalone run using the desktop-bundled Codex CLI 0.169.0-alpha.11.1 returned registered Core launch requires an installed app instead.

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

    appbugsandboxwindows-os

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions