Repository navigation
[Critical][Windows App 26.825] One writable-root setup failure disables exec and apply_patch globally #41516
Description
What version of the Codex App are you using (From “About Codex” dialog)?
Codex App 26.825.4187.0; bundled Codex CLI 0.149.0.
What subscription do you have?
Not disclosed in this public report.
What platform is your computer?
Windows 11 Pro x64, build 26200. PowerShell 7.6.4.
What issue are you seeing?
Severity: Critical workflow blocker.
The Codex App's Windows workspace-write sandbox repeatedly fails during setup refresh before any requested process starts. If setup cannot update one configured writable root, the entire sandbox becomes unusable, including narrower writable roots that are otherwise valid.
The user-visible error is:
Failed to create unified exec process:
helper_unknown_error: setup refresh had errors
apply_patch fails through the filesystem sandbox helper with the same setup-refresh error before it can read or edit a file.
A sanitized local sandbox log identifies the underlying operation only as:
write ACE grant failed on <WRITABLE_ROOT>: SetNamedSecurityInfoW failed: 5
setup refresh completed with errors
setup error: setup refresh had errors
The following all failed in the same task before process or file access:
- a minimal
Get-Locationcommand through bundled PowerShell; - a read-only Git command through
cmd.exe; apply_patchon a file inside an explicitly writable task worktree;- repeated attempts using both native and normalized path syntax.
The same read-only commands succeed when explicitly escalated outside the sandbox. This confirms that the shell, repository, worktree, and requested commands are healthy. There is no equivalent policy-compliant fallback for the required apply_patch editor, so normal repository work cannot be completed.
What steps can reproduce the bug?
- On Windows, open a local Codex project with multiple configured writable roots, including a broad workspace root and a narrower task worktree.
- Use
workspace-writesandboxing. - Run a minimal read-only command such as
Get-Locationthrough normal unified exec. - Observe that the process never starts and setup refresh returns
helper_unknown_error. - Retry through
cmd.exe; observe the same pre-launch failure. - Attempt
apply_patchinside the explicitly writable worktree; observe the same sandbox setup failure before file access. - Run the read-only command with explicit escalation outside the sandbox; observe that it succeeds.
What is the expected behavior?
- A failure on one redundant or broad writable root must not disable all valid narrower writable roots.
- The helper should skip or isolate the failing root, or provide a supported repair/elevation flow.
- The user-visible error should include the failed operation and Win32 error code instead of only
helper_unknown_error. apply_patchand read-only exec should remain usable for valid explicitly writable roots.- Sandbox setup should recover after workspace-root configuration changes without requiring unsafe filesystem workarounds.
Additional information
This is recurring rather than transient and has blocked multiple local tasks. No secrets, repository content, real paths, account identifiers, session identifiers, or customer data are included in this report.
Related open reports reviewed before filing:
- Windows Codex App: unified exec fails with
helper_unknown_error: setup refresh had errors#40596 — same generic unified-exec setup-refresh error - Codex fails to apply edits - file system refresh error - editor bridge needs to recover - 01a03e08-918b-7251-a358-7e8353fead32 #40889 —
exec_commandandapply_patchfail together - CreateProcess: Rejected("Failed to create unified exec process: helper_unknown_error: setup refresh had errors") #38290 — pre-launch unified-exec failure
- Windows sandbox fails with helper_unknown_error: apply deny-read ACLs in workspace-write mode #36087 — Windows sandbox ACL failures in
workspace-write
This report adds a current reproduction on Codex App 26.825.4187.0 and the fail-all behavior where one writable-root setup error disables otherwise valid task-specific roots.
Activity
github-actions commentedon Aug 29, 2026
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
helper_unknown_error: setup refresh had errors#40596Powered by Codex Action
vlastimilvajnorak commentedon Aug 29, 2026
Additional current reproduction on Codex App
26.825.4187.0:A newly created parallel recovery task immediately reproduced the same failure. A minimal
Get-Locationcommand and a read-only policy-file read both failed before process launch with:The same recovery task can still run approved read-only commands only through explicit execution outside the sandbox, while normal unified exec and the required
apply_patcheditor remain unavailable. This rules out corruption limited to one conversation or one task runtime.No project paths, session identifiers, account details, or repository content are included in this update.
The repository's issue-labeler automation has now correctly applied
bug,app,windows-os,sandbox, andtool-calls; no manual label bypass is needed.LeoOliveiraConcept commentedon Sep 13, 2026
I was able to identify and resolve one concrete cause of this failure on Windows 11.
Symptoms
apply_patchand filesystem operations were failing globally with:helper_unknown_error: setup refresh had errors
codex doctor --jsonreported the Windows sandbox provisioning as failed.The sandbox log revealed the actual failing writable root:
granting write ACE to C:\Program Files (x86)\PegasoDriver
write ACE grant failed on C:\Program Files (x86)\PegasoDriver:
SetNamedSecurityInfoW failed: 5
setup refresh completed with errors
The important detail was that this directory was not the main project. It was an old reference folder included in a multi-root
.code-workspace:{
"folders": [
{ "path": "." },
{ "path": "../some-other-project" },
{
"path": "../../../../../../../Program Files (x86)/PegasoDriver"
}
]
}
Codex apparently treated every workspace folder as a writable root. Since Windows does not allow the sandbox helper to add the required write ACE to this
Program Filesdirectory, that single failure caused the entire sandbox setup to fail, includingapply_patchagainst otherwise valid project files.Fix
I removed the obsolete
Program Files (x86)\PegasoDriverentry from the.code-workspacefile and reopened the workspace.After that:
setup_error.jsonwas no longer generated;apply_patchsuccessfully modified and reverted a test file;A useful diagnostic workflow for this issue is:
.code-workspace.%USERPROFILE%\.codex\.sandbox\sandbox.<date>.log.write ACE grant failed.In my case, the underlying error was:
SetNamedSecurityInfoW failed: 5
and removing the protected writable root fully restored
apply_patch.This may help distinguish this failure from OneDrive or project ACL issues: my actual project ACLs were correct, and the failure was caused by a separate protected folder included in the multi-root workspace.
jyx114514 commentedon Sep 26, 2026
I can reproduce this intermittently in Codex on Windows. The failure occurs before the requested shell starts. I explicitly tested both Windows PowerShell 5.1 and PowerShell 7; both fail with the identical unified-exec setup-refresh error before reporting their version or executing Get-Location. cmd.exe is affected at the same stage as well.
This therefore does not appear to be specific to PowerShell 5.1/7 or the command being executed.
Interestingly, the condition can sometimes recover after repeated tool-execution attempts without changing Windows permissions, sandbox configuration, or project files.
Windows 11
codex:26.909.11814