CreateProcess: Rejected("Failed to create unified exec process: helper_unknown_error: setup refresh had errors")
What version of the Codex App are you using (From “About Codex” dialog)?
26.803.81509
What subscription do you have?
Plus
What platform is your computer?
Microsoft Windows NT 10.0.26200.0 x64
What issue are you seeing?
Здравствуйте. В приложении Codex for Windows не работает выполнение команд в терминале для проекта D:\Projects\React\BezVmyatin74.
Любая команда, включая самые простые (Get-Location, dir, Get-Content), не запускается вообще. Ошибка возникает до выполнения PowerShell:
CreateProcess: Rejected("Failed to create unified exec process:
helper_unknown_error: setup refresh had errors")
Из-за этого агент не может прочитать файлы проекта, внести изменения, запустить lint/build или выполнить любую диагностику через терминал.
Я уже перезапускал приложение и повторял проверку в новых задачах — результат тот же. Обычный PowerShell вне Codex стоит проверить отдельно, но по характеру ошибки проблема выглядит как сбой внутренней подготовки среды / sandbox Codex до запуска shell.
Прошу подсказать, какие логи приложить и как восстановить работу терминала.
What steps can reproduce the bug?
В Codex for Windows не запускается встроенная среда выполнения команд в проекте.
Шаги воспроизведения:
- Открыть проект: D:\Projects\React\BezVmyatin74.
- Создать или открыть task в Codex.
- Попросить агента выполнить любую терминальную команду, например:
Get-Location
или
Get-Content -Raw src\App.jsx
Ожидаемый результат:
Команда запускается в PowerShell, агент получает вывод и может читать/изменять файлы, запускать lint/build.
Фактический результат:
Команда не запускается до выполнения PowerShell. Для любой команды возвращается:
CreateProcess: Rejected("Failed to create unified exec process:
helper_unknown_error: setup refresh had errors")
Ошибка воспроизводится многократно, включая для минимальной команды Get-Location. Перезапуск приложения и новые task не помогли. Из-за этого агент не может прочитать исходники, выполнить правки или запустить проверки.
Проект: D:\Projects\React\BezVmyatin74
ОС: Windows
Интегрированный shell: Windows PowerShell
ID исходной задачи: 019ff37d-5b19-7bc2-a0cf-b141921935e0
Фрагмент для воспроизведения:
Get-Location
What is the expected behavior?
Ожидается, что Codex создаст встроенный процесс терминала и выполнит команду в выбранном shell (Windows PowerShell).
Например, после запуска команды Get-Location агент должен получить текущую рабочую папку проекта. После Get-Content -Raw src\App.jsx он должен прочитать файл. Затем должны работать обычные команды разработки, включая lint и build.
Терминальная среда должна запускаться для любой корректной команды и не должна завершаться ошибкой на внутреннем этапе setup refresh до запуска PowerShell.
Additional information
Проблема наблюдается внутри Codex Desktop на Windows и блокирует любую работу с локальным проектом: агент не может выполнить даже безопасную диагностическую команду, поэтому невозможно читать файлы, вносить изменения, запускать тесты, lint или build.
Ошибка стабильно возникает до фактического запуска powershell.exe, поэтому это похоже на проблему подготовки внутренней среды выполнения / sandbox Codex, а не на ошибку конкретной команды или исходного кода проекта.
Проверка выполнялась в проекте:
D:\Projects\React\BezVmyatin74
Буду признателен за указания, где найти и приложить диагностические логи приложения.
12 Comments
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action
Thanks. The suggested duplicate CLI issues do not match my setup:
where.exe codexreturns no result; Codex CLI is not installed.%LOCALAPPDATA%\Programs\OpenAI\Codexdoes not exist.The failure is reproducible in the Desktop App with any command (
Get-Location) before PowerShell starts:helper_unknown_error: setup refresh had errors.Could this be the same helper-resource discovery issue in the Desktop App sandbox rather than the standalone CLI launcher?
Update: project ownership and sandbox state were checked.
Workspace owners are correct:
D:\Projects -> PC-ALEKSANDR\dorok
D:\Projects\React -> PC-ALEKSANDR\dorok
D:\Projects\React\BezVmyatin74 -> PC-ALEKSANDR\dorok
The sandbox setup itself reports success:
setup refresh: processed 1 write roots (read roots delegated); errors=[]codex-windows-sandbox-setup.exe] setup binary completedThe repeated concrete failure in the sandbox log is:
hide users: failed to hide current user profile dir (C:\Users\Default):SetFileAttributesW failed for C:\Users\Default: 5 (Access is denied.)
The app then still reports the generic:
helper_unknown_error: setup refresh had errorsCodex resolves and reuses the packaged command runner successfully, so this does not appear to be a missing CLI resource or workspace ACL issue. Please investigate why the Windows sandbox tries to change attributes on C:\Users\Default and whether that failure is causing the unified exec process to fail.
I can reproduce this on Codex Desktop for Windows as of 2026-08-16 (JST).
Observed errors:
Impact:
apply_patchfailed in another Codex task with the same setup refresh error.Troubleshooting already performed:
A possibly separate symptom started around 2026-08-15 JST: the Codex desktop app has occasionally closed unexpectedly while receiving/processing a large number of task/delegation updates. I cannot confirm that the crash and the setup-refresh failure share the same root cause.
Because all local diagnostic execution is blocked by the same error, I cannot currently collect the app version or run deeper local checks from Codex. Please advise which application logs or Windows diagnostics would be most useful and whether there is a supported recovery procedure for the sandbox setup-refresh state.
Update: I was able to resolve the issue on my system.
The problem was caused by incorrectly configured Windows user environment variables for temporary files:
TEMPTMPBoth variables must point to an existing directory that the current Windows user can write to. In my case, I corrected both values to:
C:\Users\<username>\AppData\Local\TempSteps that fixed the issue:
TEMPandTMP.After correcting both variables and restarting Windows, the Codex sandbox started working normally again. Terminal commands, file access, and
apply_patchalso began working without thehelper_unknown_error: setup refresh had errorsfailure.The Codex dependency diagnostics had previously reported that everything was fine, so checking
TEMPandTMPmay be useful when the dependency check passes but the Windows sandbox still fails.This may not be the cause in every case, but I hope it helps other Windows users experiencing the same issue.
This comment was drafted with assistance from OpenAI's ChatGPT.
I can reproduce this on Codex Desktop for Windows as of 2026-08-20.
Environment
OpenAI.Codex 26.818.2441.010.0.26200, build26200Minimal reproduction
Get-Location.Impact
TEMP/TMP check
The workaround mentioned above does not appear to apply here:
TEMPis configured and points to an existing directory.TMPis configured and points to an existing directory.Expected behavior: sandbox setup refresh should succeed, or the error should surface the concrete failing ACL/path/resource instead of only returning
helper_unknown_error. Browser initialization should not be prevented by a failed or stale workspace sandbox refresh.I can reproduce the same Windows sandbox setup/refresh failure described in this issue.
Environment:
The issue started after the August 20 update.
Minimal reproduction:
Get-Location.CreateProcess: Rejected("Failed to create unified exec process: helper_unknown_error: setup refresh had errors")nodeRepl.write("ready"). The trusted Node process exits unexpectedly.Get-Locationcommand succeeds when sandbox restrictions are disabled.%TEMP%.The failure reproduces across projects and tasks. This strongly suggests that the problem is isolated to the Windows sandbox setup/refresh path, rather than the workspace, PowerShell, or
TEMP/TMPpermissions.This appears to be the same issue and may provide an additional independent reproduction for triage.
Independent reproduction from Codex Desktop on Windows, with a more specific lower-level log signal.
Environment
OpenAI.Codex 26.818.4152.00.149.0-alpha.4.110.0.26200, build26200elevatedD:(not WSL or UNC)Reproduction and impact
The problem first appeared while multiple Codex tasks were active. That timing is only a correlation; I cannot prove concurrency is the trigger.
Get-Location.apply_patchfails with the same setup-refresh error.Lower-level evidence
The latest sandbox log repeatedly reports that setup itself completed successfully:
Immediately afterward, the command runner repeatedly logs:
Additional checks:
%USERPROFILE%\.codex\.sandbox\deny_read_acl_state.jsonexists, is valid JSON, and is 22 bytes; this is not the NUL-filled/corrupt-state case.TEMPandTMPboth exist and point to the same directory, so the TEMP/TMP workaround does not apply.Expected behavior: a failure to change attributes on
C:\Users\Defaultshould either be handled without preventing all sandboxed processes from starting, or the app should surface this concrete failing operation instead of the genericsetup refresh had errorsmessage.I can independently reproduce this Windows sandbox setup/refresh failure in Codex Desktop.
Notable same-session transition
The workspace was initially functional.
At approximately 22:20, Codex successfully created
pomodoro-timer.htmlin a Google Drive-mounted workspace:G:\我的雲端硬碟\codexCodex reported a
+76 -0file change and opened the file in the system's default Chrome browser. I independently confirmed that the file existed and rendered correctly as a working Pomodoro timer.Approximately one to two minutes later, in the same Codex session and the same workspace, Codex could no longer:
.md,.json,.py, or.htmlfiles;Get-LocationorGet-ChildItem;The recurring errors were:
and:
The initial file creation and browser launch succeeded, but Codex subsequently lost the ability to inspect, verify, or modify the file it had just created. This suggests that a previously working workspace/sandbox state can become unusable during an active session, rather than the workspace simply being inaccessible from the beginning.
Additional isolation tests
C:test directory also encountered the same terminal/setup-refresh failure, so the Google Drive-mounted workspace does not appear to be the sole cause.git statusandgit log -1 --onelineboth succeed, confirming that the normal Windows terminal and Git installation are functional.I am not claiming a confirmed ACL or
TEMP/TMProot cause because I do not currently have the lower-level sandbox log. The directly observed behavior is that Codex successfully wrote and launched a file, then lost workspace, terminal, existing-file, and browser-control access in the same session.Please provide either a supported way to reset the Windows sandbox/setup-refresh state or clear instructions for collecting the relevant diagnostic logs.
Additional environment note
The Codex CLI is not installed or available on
PATHon this machine. Runningcodex --versionin normal PowerShell returnsCommandNotFoundException. This report concerns the Codex Desktop App and its bundled Windows sandbox, not the standalone Codex CLI.Persistence and TEMP/TMP verification update
The failure first occurred on Friday and was reproduced again on Sunday, so it is not limited to a short-lived failure in one app session.
Before the Sunday retest, both ChatGPT and ChatGPT Classic were fully terminated through Windows Task Manager and ChatGPT was reopened. The normal Codex sandbox still failed before PowerShell started when attempting
Get-Location, workspace enumeration, and reading the first five lines ofpomodoro-timer.html.The suggested
TEMP/TMPworkaround was also tested:TEMPandTMPboth resolve toC:\Users\user\AppData\Local\Temp.Test-Path $env:TEMPandTest-Path $env:TMPreturnTrue.Therefore, the temporary-directory path and normal user write access are functioning, and that workaround does not resolve this case.
One explicitly approved elevated read was able to access Codex's built-in instructions. However, this does not indicate recovery of the normal sandbox: ordinary workspace reads, file operations, and terminal execution remain blocked by
helper_unknown_error: setup refresh had errors.Independent aggregate from Codex Desktop 26.818.41509 / bundled command runner 0.149.0-alpha.4.1 on Windows:
This suggests a token-amplification failure mode in addition to the sandbox bug. Please cache a terminal setup-refresh failure at the host/session level, prevent equivalent tool/helper retries until environment state changes, and return a structured underlying cause plus supported recovery action. That would keep the model from spending further turns rediscovering that syntax and shell changes cannot repair sandbox setup.
I can reproduce the same failure in Codex Desktop on Windows, including in a Google Drive-mounted workspace:
G:\我的雲端硬碟\codexFailure
PowerShell, cmd, and rg fail before the command starts:
I also saw:
This affects even minimal commands such as
Get-LocationandGet-ChildItem, so the agent cannot enumerate a directory, read existing files, or run diagnostics.File-operation behavior
There was an inconsistent but relevant behavior:
apply_patchcreating a new test file (AGENTS-copy.md) succeeded..md,.json,.py, and.html.So this is not simply a Markdown/HTML parsing problem; it appears to block the unified-exec/sandbox path that Codex needs to inspect and modify existing workspace content.
Comparison checks
git statusandgit log -1 --onelineboth completed successfully outside Codex.That makes this look intermittent or task/workspace-initialization-specific inside Codex Desktop, rather than a general inability to use cloud-mounted folders or a problem with the project files.
No local project files were modified for this report.
Additional comparison (2026-08-26, Asia/Taipei):
In a separate new Codex Desktop task with workspace
C:\Users\user\Documents\Codex, the minimal PowerShell commandGet-Locationsucceeded and returned that directory. Nohelper_unknown_error: setup refresh had errorsoccurred in that task.This does not prove that Google Drive is the root cause of the earlier failure at
G:\我的雲端硬碟\codex. It does show that the failure is not a continuously broken, global Windows sandbox state: behavior can differ between tasks/workspaces. The earlier Google Drive task still failed before command execution for PowerShell, cmd, and rg, so it remained unusable for reliable workspace reads/edits at that time.No local project files were modified for this comparison.