Repository navigation
Description
What version of the Codex App are you using (From “About Codex” dialog)?
26.930.41038 (Microsoft Store package OpenAI.Codex 26.930.4958.0)
What subscription do you have?
Pro
What platform is your computer?
Windows 11 Pro build 26300.9457 (Insider build), x64. Security software: ESET Internet Security 19.2.10.0. [windows] sandbox = "elevated" (default).
What issue are you seeing?
I uninstalled the Windows app, moved the old %USERPROFILE%\.codex folder away, and installed the app again. After that, every shell command fails before it starts:
exec_command failed: CreateProcess { message: "Rejected(\"Failed to create unified exec process: helper_unknown_error: setup refresh had errors\")" }
File edits still work. Commands worked on the same machine before the reinstall.
Sandbox log (%USERPROFILE%\.codex\.sandbox\sandbox.<date>.log):
granting write ACE to C:\Users\<user>\AppData\Local\Temp for sandbox group and capability SID
write ACE grant failed on C:\Users\<user>\AppData\Local\Temp: SetSecurityInfo failed: 5
setup refresh completed with errors: ["write ACE failed on C:\\Users\\<user>\\AppData\\Local\\Temp: SetSecurityInfo failed: 5"]
setup error: setup refresh had errors
In the same run, the write ACEs for the workspace folder and for .codex\... were granted successfully. Only %LOCALAPPDATA%\Temp failed.
Tests on this PC strongly suggest that ESET's HIPS-related protection blocks the DACL change on the Temp folder itself. I checked this on one PC running a Windows Insider build. Other environments were not tested, and not every other factor was ruled out.
- The user owns Temp and has Full Control. The folder can be opened with WRITE_DAC, but writing the DACL is denied:
- .NET
Directory.SetAccessControl: UnauthorizedAccessException NtSetSecurityObject(DACL only, no inheritance propagation):0xC0000022STATUS_ACCESS_DENIED. Same result from an elevated PowerShell.
- .NET
- The same call succeeds on subfolders of Temp. Only Temp itself is denied.
- Pausing ESET's real-time file system protection did not change the result.
- As a diagnostic experiment, with the network cable unplugged, I disabled HIPS for a short time. With HIPS disabled, the same non-elevated
NtSetSecurityObjectcall succeeded (0x00000000), which added the ACE for the new capability SID to Temp. - I then turned HIPS back on and rebooted. Commands now run in the sandbox with HIPS enabled, because the ACE stays on Temp and setup no longer needs to write it.
What I observed about the SID: after the old .codex was moved away and recreated, a new capability SID was created (in the new %USERPROFILE%\.codex\cap_sid), and setup tried to add an ACE for this new SID to Temp. Temp also has ACEs for 4 other existing capability SIDs that were added earlier. I did not test whether a reinstall alone (keeping .codex) creates a new SID.
What steps can reproduce the bug?
Reproduced only on this one PC:
- Windows 11 (Insider build 26300) with ESET Internet Security, HIPS enabled (default).
- Uninstall the Codex app, move
%USERPROFILE%\.codexaway, then install the app again. A new.codex\cap_sidis created. - Open a local project and ask Codex to run any command (e.g.
dir). - The command fails with
helper_unknown_error: setup refresh had errors. The sandbox log showsSetSecurityInfo failed: 5on%LOCALAPPDATA%\Temp.
What is the expected behavior?
- A solution that works with ESET HIPS kept enabled and the sandbox isolation kept intact. Disabling HIPS is not an acceptable workaround, because it also turns off other ESET protections.
- An official way to recover from this state without weakening the sandbox (for example, a documented repair step).
- The UI should show which path failed and the Win32 error, not only "setup refresh had errors". With the real path, users can see that a security product may be involved.
- If HIPS-type products are known to conflict with the Windows sandbox setup, a short note in the docs would help.
Additional information
- The HIPS experiment above was done only to find the cause. It is not a workaround I recommend, and I would like a fix that works with HIPS enabled.
- An ESET HIPS exclusion rule for the Codex sandbox processes was not tested.
- File system minifilters loaded: bindflt, FsDepends, UCPD, wtd, eamonm (ESET), storqosflt, gameflt, CldFlt, bfs, FileCrypt, luafv, UnionFS, npsvctrig, Wof, FileInfo.
- Possibly related (same error text; I have not confirmed they share this cause): Elevated Windows sandbox intermittently fails setup refresh with SetNamedSecurityInfoW ERROR_ACCESS_DENIED (5) #44882, Windows Codex regression: elevated sandbox fails setup refresh; unelevated denies trusted workspace writes #50772, Codex Desktop Windows sandbox setup fails on NTFS ACL / SetNamedSecurityInfoW error 5, then agents fall back to unsandboxed PowerShell escalation #31620, helper_unknown_error: setup refresh had errors #44309. Capability SID change after sandbox reinit: [Windows] Sandbox: Access denied on existing workspace descendants after sandbox SID change #46213.
Activity
github-actions commentedon Oct 4, 2026
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action
oyishyi commentedon Oct 4, 2026
same issue