Skip to content

helper_unknown_error: setup refresh had errors #44309

Open

Description

@oliviertu

What version of the Codex App are you using (From “About Codex” dialog)?

GPT-6 Astra

What subscription do you have?

Agent shell commands fail before execution with helper_unknown_error: setup refresh had errors. Restarting did not resolve it. The task’s workspace is C:\AI_Class_Sale. Git, Node.js, Prisma, and Docker work in external PowerShell.

What platform is your computer?

Windows 11

What issue are you seeing?

Agent shell commands fail before execution with helper_unknown_error: setup refresh had errors. Restarting did not resolve it. The task’s workspace is C:\AI_Class_Sale. Git, Node.js, Prisma, and Docker work in external PowerShell.

windows sandbox failed: helper_unknown_error: setup refresh had errors

What steps can reproduce the bug?

Use ChatGPT Codex and create a project and implement it - we will have the error after we create a first project with GPT 5 and a second project with GPT 6

The wok-around is to use Codex's PowerShell through approved -execution
The default sandbox runner fails

What is the expected behavior?

Should be able to access the files (R, W, E) in the project directoryproject

Additional information

The helper of GPT 5 worked partially.

Activity

  1. added
    app
    on Sep 9, 2026
  2. added
    bug
    windows-os
    tool-calls
    on Sep 9, 2026
  3. lynnysk commented on Sep 11, 2026

    @lynnysk

    I can reproduce this on Codex Desktop for Windows.

    • Restarting Codex Desktop did not resolve the issue.
    • Every agent shell command fails before process creation, including trivial read-only probes such as Get-Location.
    • The same failure occurs when attempting a probe from the workspace and from a system temporary directory, so it does not appear workspace-specific.
    • The Computer Use kernel also fails to initialize with the same helper_unknown_error: setup refresh had errors during sandbox setup.
    • No project files were modified, and no requested command actually ran.

    Exact error:

    Failed to create unified exec process: helper_unknown_error: setup refresh had errors
    

    Expected: the Windows sandbox/helper should initialize and permit scoped local commands to run.

  4. ragePolpette commented on Sep 18, 2026

    @ragePolpette

    Additional data point: Codex App 0.155.0 on Windows. In a normal workspace, apply_patch first failed with fs sandbox helper failed with status exit code 1: windows sandbox failed: helper_unknown_error: setup refresh had errors. Later exec_command failed before launch with CreateProcess rejected / helper_unknown_error / setup refresh had errors. The problem was resolved only after downgrading Codex; it did not recover spontaneously or without a version change. Impact: no file patches and, temporarily, no commands could run. Docker services were healthy and external PowerShell commands still worked. No secrets, workspace paths, or logs attached.

  5. Freemlen commented on Sep 19, 2026

    @Freemlen

    Related Windows RCA: #43373.

    A controlled investigation on another affected Windows installation reproduced the same top-level helper_unknown_error: setup refresh had errors symptom and separated several different failure layers.

    Most relevant findings:

    • a default user-Temp ACL refresh failure was enough to block trusted runtime startup;
    • process-scoped TEMP/TMP=C:\CodexTemp restored trusted node_repl and native Windows Computer Use on that machine;
    • deeper ETW showed that SetNamedSecurityInfoW(...)=5 should not automatically be read as “the root SetSecurity itself was denied”;
    • synthetic controls also showed that top-level success can coexist with incomplete descendant ACL propagation.

    So this is not claimed as a universal fix for every setup refresh had errors report, but if your sandbox log names user Temp/AppData or another ACL target, the diagnostics and workaround in #43373 may help distinguish the failure layer.

  6. zLanp1e commented on Sep 20, 2026

    @zLanp1e

    所以现在有什么直接的解决方法吗

  7. Freemlen commented on Sep 21, 2026

    @Freemlen

    Yes — there is a practical workaround if your sandbox log shows the failure on the normal user Temp path (for example %LOCALAPPDATA%\Temp).

    Verified on another affected Windows machine:

    1. Fully close Codex/ChatGPT so no old Codex process tree remains.
    2. Create a normal writable folder, e.g. C:\CodexTemp.
    3. Launch Codex with process-scoped only:
    $env:TEMP = 'C:\CodexTemp'
    $env:TMP  = 'C:\CodexTemp'
    Start-Process 'C:\Program Files\WindowsApps\OpenAI.Codex_26.908.9136.0_x64__2p2nqsd0c76g0\app\ChatGPT.exe'

    Do not change global Windows TEMP/TMP, ACLs, registry, or disable security software.

    On the affected machine this changed sandbox refresh from SetNamedSecurityInfoW failed: 5 on the default Temp path to errors=[], after which trusted node_repl, @oai/sky, and native Windows Computer Use worked.

    Important: this is not a universal fix for every setup refresh had errors; the same top-level error can have different causes. If your sandbox log points at another path, please post that exact failing path/error.

    Full investigation and A/B evidence: #43373


    如果你的 sandbox 日志明确显示失败发生在普通用户的 Temp 路径(例如 %LOCALAPPDATA%\Temp),目前有一个已验证的临时解决办法:

    1. 完全退出 Codex/ChatGPT,确保旧的 Codex 进程都已结束;
    2. 新建一个普通可写目录,例如 C:\CodexTemp;
    3. 只对这次 Codex 启动设置进程级的 TEMP/TMP,不要修改 Windows 全局环境变量。

    不要改全局 TEMP/TMP、不要递归修改 ACL、不要改注册表,也不要关闭 ESET/Defender。

    这个方法在一台受影响的 Windows 机器上已验证成功:sandbox refresh 恢复正常,随后 node_repl、@oai/sky 和原生 Windows Computer Use 都可以工作。

    但这不是所有 setup refresh had errors 的通用修复。如果你的日志里报错的是其他路径,请把那个具体路径和错误贴出来。完整 RCA:#43373

  8. abeward commented on Oct 11, 2026

    @abeward

    I also had this issue.

    Problem: Codex returned helper_unknown_error: setup refresh had errors before running any command. Restarting Codex and the computer didn’t resolve it. The sandbox log showed an ACL failure on the project’s .codex folder.

    Solution: Changing that folder’s owner to the Windows account restored workspace command access. I verified commands and Git status afterward. (⚠️This fix applies when the sandbox log shows an ACL failure on that project’s .codex folder.)

    1. Close ChatGPT fully: File > Quit ChatGPT. Check Task Manager to make sure it isn’t still running; you may need to search for it.

    2. Open PowerShell as Administrator, then run:

      icacls '<project-folder>\.codex' /setowner '<DOMAIN>\<USERNAME>'

      For me, the command was:

      icacls 'G:\Developer\myProject\.codex' /setowner 'my-pc-name\abeward'

      Your path depends on where the project is set in GPT’s workspace settings. Many worktrees may be on C:, for example: C:\Users\abeward\.codex\worktrees\your-worktree-gpt-made\repo-name\.codex. You can ask GPT to help find the correct path, but target the specific repo with the sandbox issue. Run whoami by itself to find your Windows account name.

    3. Look for Successfully processed 1 files; Failed processing 0 files.

    4. Reopen ChatGPT/Codex and have it try again. This worked for me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    appbugtool-callswindows-os

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions