Codex/Windows Sandbox Failure

Open 💬 7 comments Opened Aug 16, 2026 by iborg6502
💡 Likely answer: A maintainer (github-actions[bot], contributor) responded on this thread — see the highlighted reply below.

August, 16, 2026

I encountered a Codex/Windows Sandbox failure that I was unable to solve. The troubleshooting account below picks up after the Agent outlined a series of steps to help diagnose the problem. The conflict initially appeared related to WIndows Firewall, but, the conflict was unresolved after those settings were adjusted. Here is the full troubleshooting account:

Trouble Shooting Codex/Windows Sandbox failure.

(question to agent was not captured)
That means the command did not actually start. The helper failed while refreshing the sandbox configuration. Because one command subsequently worked and another failed, this looks like an intermittent Codex sandbox initialization problem—not evidence that C:\soft_dev\data has bad permissions.

Try these repairs in order:

  1. Close this Codex/ChatGPT workspace or conversation and reopen it.
  2. Fully quit the desktop application—not just its window—then launch it again.
  3. Remove and re-add the workspace folders:C:\soft_dev\repos\re-byte

C:\soft_dev\data\re-byte_data

  1. Confirm both folders still exist in ordinary File Explorer.
  2. Install any available ChatGPT/Codex application update.
  3. Restart Windows if the failure persists.
  4. Check Windows Security or third-party antivirus history for a blocked Codex/ChatGPT helper process. If one appears, restore/allow that specific signed executable; do not disable antivirus globally.

If every new session still fails, capture the exact error and app version and report it through the application’s Help/Report a problem option.
Avoid changing NTFS permissions, taking ownership of C:\soft_dev\data, or running the app permanently as Administrator at this stage. The error occurs during sandbox setup, before normal filesystem permission checking.

Official OpenAI documentation currently does not appear to document this exact internal error code, so the diagnosis above is based on the error phase and the observed intermittent behavior, not a published repair procedure.

How should I trigger the Windows sanbox helper unknow error after each step?

"Run a read-only sandbox test: list the first five items in C:\soft_dev\data. Report the complete error if it fails."

Get-ChildItem -LiteralPath 'C:\soft_dev\data' -Force |
Select-Object -First 5 Name, Mode
Interpret the result as follows:
Folder contents appear: sandbox helper worked.
Access denied: helper worked, but the sandbox lacks permission for that folder.
Path not found: helper worked, but the path is unavailable.
helper_unknown_error: setup refresh had errors: the original sandbox-helper problem remains.

A different error: preserve the complete message; it may identify the actual cause.
For a stronger check, ask me to run the test three times. Because the failure has appeared intermittent, one success does not prove it is repaired. Three consecutive successes after reopening Codex are a reasonable initial confirmation.

Repair attempts in oder:

  1. Close this Codex/ChatGPT workspace or conversation and reopen it.

"Run a read-only sandbox test: list the first five items in C:\soft_dev\data. Report the complete error if it fails."
The test failed. Complete error: Script error:
execution error: Io(Custom { kind: Other, error: "windows sandbox: helper_unknown_error: setup refresh had errors" })

  1. Fully quit the desktop application—not just its window—then launch it again.

"Run a read-only sandbox test: list the first five items in C:\soft_dev\data. Report the complete error if it fails."
The read-only sandbox test failed. Complete error: Script failed
Wall time 2.6 seconds
Output:
Script error:
execution error: Io(Custom { kind: Other, error: "windows sandbox: helper_unknown_error: setup refresh had errors" })

  1. Remove and re-add the workspace folders:C:\soft_dev\repos\re-byte

C:\soft_dev\data\re-byte_data

"Run a read-only sandbox test: list the first five items in C:\soft_dev\data. Report the complete error if it fails."
The read-only sandbox test failed. Complete error: Script failed
Wall time 2.5 seconds
Output:
Script error:
execution error: Io(Custom { kind: Other, error: "windows sandbox: helper_unknown_error: setup refresh had errors" })

  1. Confirm both folders still exist in ordinary File Explorer.

Confirmed, bot folders exist and appear intact ih the WIndows FIle Explorer.

  1. Install any available ChatGPT/Codex application update.

Codex open ai extension:
dentifier
openai.chatgpt
Version
26.810.52044
Last Updated
1 day ago
Size
882.43MB
This appears to be the latest update. The AutoUpdate checkbox is enabled. There are no other CODEX/ChatGPT environments running. Note, the same kind of problem appeared to be occurring through the web site and the desktop application.

  1. Restart Windows if the failure persists.

Windows was restarted earlier. It will be restarted again now to fully comply with the sequence of these instructions.
After restart:
I windows update was performed during the restart. Upon restart, the ChatGPT desktop interface started and is now running. A windows firewall message appeared from Visual COde Studio. I attempted to capture an image of the message but was not successful. Then the message disappeared.

"Run a read-only sandbox test: list the first five items in C:\soft_dev\data. Report the complete error if it fails."
The read-only sandbox test failed. Complete error: Script error:
execution error: Io(Custom { kind: Other, error: "windows sandbox: helper_unknown_error: setup refresh had errors" })

  1. Check Windows Security or third-party antivirus history for a blocked Codex/ChatGPT helper process. If one appears, restore/allow that specific signed executable; do not disable antivirus globally.

In WIndows Defender Firewall, theere are 8 COdex rules 6 have green check marks, two have red "ghot buster" dross outs. There are three codex outbound rules. all three are related to codex_sandbox_offline_block.

Outbound rule: one was switeched to allow if connection is secure. The test was repeated:

"Run a read-only sandbox test: list the first five items in C:\soft_dev\data. Report the complete error if it fails."
The sandbox test failed. Complete error: Script error:
execution error: Io(Custom { kind: Other, error: "windows sandbox: helper_unknown_error: setup refresh had errors" })

The halted firewall rules were changed to allow conneciton if its secure.

"Run a read-only sandbox test: list the first five items in C:\soft_dev\data. Report the complete error if it fails."
The sandbox test failed. Complete error: Script error:
execution error: Io(Custom { kind: Other, error: "windows sandbox: helper_unknown_error: setup refresh had errors" })

The Application was shut down and the PC was started again.

This notebook.txt document was started first. Visual Studio Code was started. The Codex chat window appeared and began to load with a progress bar.

"Run a read-only sandbox test: list the first five items in C:\soft_dev\data. Report the complete error if it fails."
def run_node() -> None: Script failed
Wall time 14.0 seconds
Output:
Script error:
execution error: Io(Custom { kind: Other, error: "windows sandbox: helper_unknown_error: setup refresh had errors" })

Windows firewall settings were reivewed again. The settings were unchanged from before. New settings were applied, to fully allow connections.

"Run a read-only sandbox test: list the first five items in C:\soft_dev\data. Report the complete error if it fails."

def run_node() -> None:
def run_node() -> None:
The sandbox test failed. Complete error: Script error:

Script failed
Wall time 0.6 seconds
Output:
Script error:
execution error: Io(Custom { kind: Other, error: "windows sandbox: helper_unknown_error: setup refresh had errors" })

VS Code Studio APplication was restarted.

"Run a read-only sandbox test: list the first five items in C:\soft_dev\data. Report the complete error if it fails."

The read-only sandbox test failed. Complete error:Script failed
Wall time 4.0 seconds
Output:
Script error:
execution error: Io(Custom { kind: Other, error: "windows sandbox: helper_unknown_error: setup refresh had errors" })

The test was performed from the desktop interface,
Powered by Codex & OWL
Version 26.810.52044

Released Aug 15, 2026
This program was up to date when tested.

"Run a read-only sandbox test: list the first five items in C:\soft_dev\data. Report the complete error if it fails."
The read-only sandbox test failed. Complete error: exec_command failed for "C:\Users\David Bradley\.cache\codex-runtimes\codex-primary-runtime\dependencies\native\powershell\pwsh.exe" -NoProfile -Command "Get-ChildItem -LiteralPath 'C:\soft_dev\data' | Select-Object -First 5 Name, Mode, Length, LastWriteTime | Format-Table -AutoSize": CreateProcess { message: "Rejected(\"Failed to create unified exec process: helper_unknown_error: setup refresh had errors\")" }

The tested was repeated through the Chrome interface.

"Run a read-only sandbox test: list the first five items in C:\soft_dev\data. Report the complete error if it fails."

The read-only test failed. Complete error: ls: cannot access 'C:\soft_dev\data': No such file or directory

The preceeding text was provided to the Sgent for analysis:

The evidence points to a Codex desktop sandbox-initialization defect—not a problem with C:\soft_dev\data, NTFS permissions, or Windows Firewall.
The same listing succeeded outside the sandbox and returned:
flexon_data
re-byte_data
AGENTS.md
Inside the sandbox, process creation failed before PowerShell could run:
exec_command failed for "C:\Users\David Bradley\.cache\codex-runtimes\codex-primary-runtime\dependencies\native\powershell\pwsh.exe" -NoProfile -Command "Get-Content ...": CreateProcess { message: "Rejected(\"Failed to create unified exec process: helper_unknown_error: setup refresh had errors\")" }
Key conclusions:
The directory exists and ordinary Windows access works.
The sandbox fails during “setup refresh,” before evaluating the requested filesystem operation.
Chrome’s No such file or directory is unrelated: the web execution environment cannot directly access your computer’s C:\ drive. OpenAI describes local-folder access as a desktop Codex capability. ChatGPT Work and Codex
Firewall changes did not resolve the problem. Rules named codex_sandbox_offline_block appear associated with sandbox network isolation; do not keep weakening them. Restore only the rules you personally changed to their original settings if you can identify them confidently.
Do not change ownership or permissions on C:\soft_dev\data.
The practical next step is to report this as an application defect through Help → Report a problem. Include:
App version 26.810.52044
Windows version/build
Exact helper_unknown_error text
Approximate timestamps of recent failures
The successful outside-sandbox listing above
The fact that restarting, updating, re-adding folders, and changing firewall rules did not resolve it
The executable path under .cache\codex-runtimes\codex-primary-runtime
A note that the failure occurs in both Get-ChildItem and Get-Content, proving it is not specific to one directory

View original on GitHub ↗

7 Comments

github-actions[bot] contributor · 11 days ago

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

  • #38290

Powered by Codex Action

iborg6502 · 11 days ago

This does not appear to be a duplicate issue.

fly78lv · 10 days ago

same problem

factor-irl · 6 days ago

Can confirm I see the same issue. It is always able to work outside of the sandbox. But always complains it doesn't have access inside.

pdpunto · 6 days ago

I recently hit the same Failed to create unified exec process: helper_unknown_error: setup refresh had errors failure in Codex for VS Code on Windows.

In my case, the generic error was caused by an NTFS ownership problem involving .git: the directory had unexpectedly been left owned by CodexSandboxOffline. The sandbox then failed while trying to apply a deny ACE and Windows returned SetNamedSecurityInfoW failed: 5 (Access Denied).

Before changing any permissions, I recommend checking whether your failure has the same root cause.

Check the .git owner:

(Get-Acl "C:\path\to\repo\.git").Owner

Then inspect the current sandbox log:

Get-Content "$env:USERPROFILE\.codex\.sandbox\sandbox.$(Get-Date -Format 'yyyy-MM-dd').log" -Tail 100

Look specifically for a combination like:

CodexSandboxOffline
deny ACE failed
SetNamedSecurityInfoW failed: 5
setup refresh had errors

If those are present, this may be the same ownership bug.

In my case the owner was:

MACHINE\CodexSandboxOffline

and the log contained:

deny ACE failed on C:\...\repo\.git:
SetNamedSecurityInfoW failed for C:\...\repo\.git: 5
setup refresh completed with errors
setup error: setup refresh had errors

The recovery that worked for me was:

  1. Fully close VS Code / Codex.
  2. Open Windows PowerShell as Administrator.
  3. Restore ownership of .git to the normal Windows user:
icacls "C:\path\to\repo\.git" /setowner "MACHINE\USERNAME" /T /C
  1. Verify:
(Get-Acl "C:\path\to\repo\.git").Owner
  1. Start VS Code normally again.

After that, Codex immediately recovered. I verified it by successfully running:

git rev-parse HEAD
git status --short --branch
python --version

I did not reset ACLs, delete .git, reinstall Codex, or modify repository contents.

Important: I would only apply the ownership workaround if your owner/log evidence matches this failure mode. If you do not see CodexSandboxOffline / CodexSandboxOnline ownership together with SetNamedSecurityInfoW failed: 5, your setup refresh had errors may have a different cause.

I documented the confirmed case and full workaround here:
https://github.com/openai/codex/issues/29867#issuecomment-5379916322

My environment was Codex VS Code extension 26.818.41705, with bundled runtime path showing openai.chatgpt-26.818.32112-win32-x64.

EEMO22 · 4 days ago

Recovery

I was able to recover the Windows sandbox by checking the sandbox log instead of relying only on the generic helper_unknown_error message.

The log showed:

deny ACE failed ... SetNamedSecurityInfoW failed ...: 5

In my case, the affected project .codex directories were owned by CodexSandboxOnline instead of my normal Windows user. After closing Codex and VS Code, I restored ownership from an elevated PowerShell using:

icacls "<path-to-.codex>" /setowner "<MACHINE\USERNAME>" /T /C

After restarting Codex and opening a new task, shell commands, file reads, and Git read operations worked again.

I only changed ownership for directories owned by CodexSandboxOnline or CodexSandboxOffline. I did not reset ACLs, delete .git, or change firewall settings.

shleder · 2 hours ago

Regarding the Windows Sandbox failures with Codex:

On Windows, sandboxing AI agents often fails because standard container runtimes require Hyper-V / WSL2 overhead, and file sharing over /mnt/c introduces heavy permission translation delays.

If you need a lightweight, daemon-less sandbox boundary on Windows without running full Hyper-V VMs, Vetto provides native Windows AppContainer & Job Object isolation:

# 1. Install via npm (bundles precompiled Windows x64 binaries):
npm i -g @shledery/vetto

# 2. Check Windows kernel sandbox capabilities:
vetto doctor

# 3. Launch Codex wrapped in low-integrity AppContainer sandbox:
vetto --agent codex -- codex

Key Windows features in Vetto:

  • AppContainer Isolation: Uses native Win32 security tokens and Job Objects with 0ms startup delay.
  • VFS Secret Masking: Prohibits access to %USERPROFILE%\.ssh, %USERPROFILE%\.aws, and local .env files.
  • Zero Daemon: No background services or Windows containers needed.