Workspace terminal fails to start with "setup refresh had errors"
What version of the Codex App are you using (From “About Codex” dialog)?
26.818.31338
What subscription do you have?
Plus
What platform is your computer?
Windows 11 x64
What issue are you seeing?
The workspace terminal cannot start any command.
Whenever I run a terminal command such as pwd, Get-Location, or rg --files, the command fails before execution with the following error:
CreateProcess:
Rejected("Failed to create unified exec process: helper_unknown_error: setup refresh had errors")
The issue occurs with PowerShell, Command Prompt, and the system PowerShell executable. No detailed stack trace, log path, or additional information about the "setup refresh" failure is shown.
Codex App version: 26.818.31338
Workspace runtime dependency version: 26.819.11345
What steps can reproduce the bug?
- Open Codex Desktop on Windows 11.
- Open a local workspace or repository.
- Start a new task or thread.
- Run any terminal command, for example:
pwdGet-Locationrg --files
- Observe that the command fails before it is executed.
Expected behavior:
The terminal process should start and execute the command successfully.
Actual behavior:
The terminal process is rejected during setup with:
Failed to create unified exec process: helper_unknown_error: setup refresh had errors
The issue occurs consistently across PowerShell, Command Prompt, and the system Windows PowerShell executable.
What is the expected behavior?
_No response_
Additional information
_No response_
19 Comments
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action
Additional reproduction from a Windows Codex Desktop task on 2026-08-23:
This confirms the issue blocks read-only software-engineering workflows, not only application commands.
I can reproduce the same problem in Codex Desktop on Windows.
Every local command fails before execution, including:
Get-LocationGet-Content -Raw <file>The exact error is:
I also tried switching from the bundled PowerShell runtime to the system Windows PowerShell; the failure is unchanged. Restarting/reinstalling the Codex desktop app did not resolve it.
Additional reproduction after restarting Codex Desktop on 2026-08-24:
C:\___Projects\openai-apiC:\Program Files\Git\bin\bash.exebashdependencies\native\git\bin\bash.execmd.exe /cwrapper and failed before Bash started.pwd; git --versionnever executed.CreateProcess { message: "Rejected(\"Failed to create unified exec process: helper_unknown_error: setup refresh had errors\")" }This means a full app restart and selecting an alternative shell do not provide a workaround. The failure occurs before the requested shell process starts. No repository files were modified.
I am experiencing the same issue on Windows.
The problem persists after repairing and resetting the ChatGPT app,
restarting Windows, running the app as administrator, and creating a new task.
Workspace:
C:\wamp\www\yorkfrance-php8x27
Workspace owner:
BEELINK-PC\yves
Feedback ID:
01a030e1-174d-78e2-aa70-15f10e5597bb
I can independently reproduce this on Windows in the Codex desktop app today (2026-08-24).
Symptoms match this issue exactly:
Get-Locationtest.Failed to create unified exec process: helper_unknown_error: setup refresh had errorsD:).This is currently blocking further local development/testing because even a basic read-only shell command cannot start.
Happy to provide additional non-sensitive diagnostics if there is a recommended collection procedure.
I can reproduce the same failure on a newer Windows app version.
App version: 26.818.5229.0
Subscription: ChatGPT Pro (5×)
Platform: Microsoft Windows NT 10.0.26200.0 x64
The error is intermittent: one PowerShell command may succeed, while the next independent command fails before process creation with:
Failed to create unified exec process: helper_unknown_error: setup refresh had errors
The issue also affected in-app browser control in a previous task. It persisted after repairing the app, restarting Windows, and starting a new task.
Feedback ID with session and browser logs:
01a03224-b13f-73a1-90d2-43c1bb438f87
I can reproduce this error on app version 26.819.11345 on windows 11 x64
Reproducible with; Get-Date -Format o (or any powershell command)
helper_unknown_error: setup refresh had errors
Persists after reinstall and restart
Additional reproduction from Codex Desktop on Windows on 2026-08-25:
C:\___Projectshelper_unknown_error: setup refresh had errors.C:\Program Files\Git\bin\bash.exeandC:\Program Files\Git\usr\bin\bash.exedid not start Git Bash; the execution result instead showed acmd.exe /cwrapper and failed during setup.C:\Program Files\Git\bin\bash.exefrom the bundled PowerShell runtime also failed before Bash started.pwdnever executed.This confirms the failure persists across another local workspace and blocks explicit alternative-shell selection as well as direct shell invocation.
Still reproducible after updating the Windows app.
Previous version: 26.818.5229.0
Current version: 26.818.8289.0
Platform: Microsoft Windows NT 10.0.26200.0 x64
Immediately after the update, a read-only Get-Location command again failed before PowerShell started with:
Failed to create unified exec process: helper_unknown_error: setup refresh had errors
No repository files were modified and no external operation was attempted.
Related feedback ID:
01a03224-b13f-73a1-90d2-43c1bb438f87
Additional reproduction on 2026-08-25:
A minimal
Get-Locationcommand fails before PowerShell starts with:CreateProcess { message: "Rejected(\"Failed to create unified exec process: helper_unknown_error: setup refresh had errors\")" }The same sandbox setup failure also affects:
apply_patch, while trying to read/verify a workspace fileAn explicitly approved out-of-sandbox execution succeeds with:
This suggests the underlying repository and filesystem access are functional and the failure is specifically in Windows sandbox setup/refresh.
Critical recurrence — 2026-08-26
This remains reproducible in Codex Desktop on Windows and is currently a complete blocker for local repository work.
Every command is rejected before process launch with:
Reproduced with both the bundled PowerShell (
pwsh.exe -Command Get-Location) and Command Prompt (cmd.exe /c cd).Opening the task terminal panel returned
status: queued, but the task continued to report:Retrying from the same task after refreshed environment context did not recover the process host.
Impact: critical. No shell command can start, so Git status/fetch/worktree checks, repository inspection, builds, tests, and safe file modifications are all blocked. The repository was intentionally left unchanged because mandatory safety checks could not run.
Still reproducible after another Windows app update.
Previous affected version: 26.818.8289.0
Current affected version: 26.820.7780.0
Platform: Microsoft Windows NT 10.0.26200.0 x64
Immediately after updating, a read-only Get-Location command failed before PowerShell started with:
Failed to create unified exec process: helper_unknown_error: setup refresh had errors
No repository files were modified and no external operation was attempted.
Related feedback ID:
01a03224-b13f-73a1-90d2-43c1bb438f87
Confirmed fix for my instance of this issue on Windows.
The displayed error was:
The specific cause was recorded in:
My log contained:
Checking the directory showed that
.gitwas incorrectly owned byCodexSandboxOffline:I opened PowerShell as Administrator and restored ownership of only that directory:
After restarting Codex:
.gitwas owned by my Windows account;errors=[];This fix is path-specific. Other instances of
setup refresh had errorsmay involve Temp, WindowsApps, WSL/UNC paths, or another workspace directory. Check the current sandbox log for the exact failing path before changing ownership or permissions. Recursive ACL changes should not be necessary unless the log explicitly identifies child paths.I can reproduce this on Codex Desktop 26.820.7780.0 on Windows x64 in a local workspace. On 2026-08-26 (Europe/Warsaw), Browser startup via node_repl fails before browser selection. The Node kernel exits with code 1 and reports: windows sandbox failed: helper_unknown_error: setup refresh had errors. The initial normal sandboxed PowerShell command also fails before process creation with the same setup-refresh error, while the equivalent read-only check succeeds with elevated sandbox approval. This blocks browser control and normal sandboxed commands. The issue began about a week ago. I fully terminated Codex, used Windows App Repair, and then completely uninstalled and reinstalled it; the failure persists. C:\tmp does not exist on this system. The installed package reports Status: Ok.
Update — resolved for my instance. Thanks @vlastimilvajnorak for sharing the targeted diagnostic steps in https://github.com/openai/codex/issues/39841#issuecomment-5417973139. My sandbox log identified the repository .git directory as the failing path: the sandbox could not apply its deny ACE because that directory was owned by CodexSandboxOffline. Restoring ownership of that directory only to the Windows user fixed the issue immediately: normal sandboxed commands and the in-app browser now start successfully. No recursive ACL changes were needed.
Thank you, @ablazhko — your diagnosis and targeted fix resolved the issue for me.
My sandbox log showed the same failure on the workspace repository’s
.gitdirectory:deny ACE failed ... .git: SetNamedSecurityInfoW failed ... : 5The directory owner was
CodexSandboxOffline. Restoring ownership of that directory only to my normal Windows user account fixed the problem immediately. No recursive ownership or ACL changes were needed.After that, normal sandboxed terminal commands started working again. Thanks again for identifying such a precise and safe solution.
Confirmed workaround on Windows
I was hitting the same error:
Codex could not start PowerShell, CMD, Git, or any local process.
I checked:
and found:
5=Access Denied.Then I checked the
.gitowner:It was unexpectedly owned by:
instead of my normal Windows account.
Fix
I closed Codex completely, opened PowerShell as Administrator, and ran:
After reopening Codex, local execution worked again immediately:
No reinstall, reclone,
.gitdeletion, or recursive permission reset was needed.So if you are seeing
setup refresh had errors, check whether your.gitdirectory is owned byCodexSandboxOffline. Restoring ownership to the normal Windows user may fix the issue.@MadMick96 Thank you . Based on your answer, it is currently resolved!
On Windows, Codex Desktop may fail with:
This usually means that the Codex Windows sandbox failed while applying or refreshing filesystem ACLs.
1. Check the current sandbox log
Sandbox logs are located under:
You can locate the newest log with PowerShell:
Then inspect the end of that log:
Look for an error similar to:
or:
Windows error code
5means:The path reported in the log is the path that should be investigated.
2. Check the owner of the failing path
For example, if the log reports:
check its owner:
Or, if the failing path is:
run:
Normally, the owner should be the Windows account that owns the repository, for example:
A problematic case can look like:
In that situation, the sandbox account appears to have incorrectly retained ownership of the directory. A later sandbox refresh may then fail when Codex tries to modify the ACL again.
3. Restore ownership only for the failing path
First, fully exit Codex Desktop.
Then open PowerShell as Administrator.
If the failing path is
.git:If the failing path is
.codex:Then verify the owner:
or:
The owner should now be your normal Windows account.
4. Do not recursively reset ACLs unless the log requires it
In most cases, commands such as these should not be necessary:
or:
Codex uses specific Allow/Deny ACEs as part of its sandbox implementation. Recursively resetting the entire repository may remove ACL entries that Codex intentionally created.
The safer rule is:
5. Restart Codex and verify the sandbox log
After restoring ownership, restart Codex Desktop.
A successful sandbox setup should contain output similar to:
The important indicator is:
The following should no longer appear:
or:
6. Test normal sandbox filesystem operations
After restarting, test a few basic operations through Codex: