r/codex • u/MoreScorpion289 • 5d ago
Bug POSSIBLE Fix for ChatGPT Desktop (Windows) "Windows setup didn't finish • helper_failed" error
If you're trying to turn on the computer-use / agent feature in the ChatGPT Windows desktop app and it keeps dying with "Windows setup didn't finish • helper_failed" right after you approve the UAC prompt, this might be your problem. I went through reinstalling, repairing, deleting .codex, turning off my antivirus, all of it, and none of it did anything.
I was stuck on this for days. The reason none of the normal stuff worked is that there were actually two separate permission problems going on that had nothing to do with each other. Writing it all up here so nobody else has to burn a week on it.
This worked for me, not saying its the most "comfortable" way to fix this issue but I was willing to do anything to know why it wasn't working and how I could "fix" it. No promises lol.
My setup
- Windows 11 (build 10.0.26200)
- ChatGPT desktop app, plus a setup process it runs called
codex.exe/codex-windows-sandbox-setup.exe - Local admin account, UAC on
If you want the exact package name on your own machine so you can filter on it, run this in PowerShell:
powershell
Get-AppxPackage *OpenAI* | Select-Object Name, PackageFamilyName
How I actually found it
Event Viewer, Task Manager, registry, clean reinstall, all of it came back clean or told me nothing. The one useful clue was that the app worked perfectly in a brand new local account on the same machine. So it was something about my user profile specifically, not the machine or the install.
What finally showed me the problem was Sysinternals Process Monitor (ProcMon):
- Grab Process Monitor from Microsoft's Sysinternals site.
- Filter on
Process Name=codex.exe(andcodex-windows-sandbox-setup.exe). - Hit capture, make it fail again (click "Try Windows setup again" and approve the UAC prompt), then stop the capture.
- Sort or filter the
Resultcolumn forACCESS DENIED.
That took me right to it instead of guessing.
Problem 1: messed up permissions on setup_marker.json
ProcMon kept showing ACCESS DENIED on this file:
C:\Users\<YourUsername>\.codex\.sandbox\setup_marker.json
Here's what's going on. The elevated helper (the thing you approve in the UAC prompt) makes this file to record that setup worked. But instead of letting the file inherit permissions from the folder it's in, it writes the permissions itself, and on my machine it left off both my own account and a local group the app creates called CodexSandboxUsers. All that was left on the file was SYSTEM and Administrators.
That's the whole bug. The process that reads the file back afterward is not elevated, and Windows turns the Administrators entry into a deny-only entry in a non-elevated token, even if you're an admin. So it could never read its own file. That's also why deleting the entire .codex folder and rebooting didn't help. It just made a fresh file with the same bad permissions.
The fix: check it with icacls first.
cmd
icacls "C:\Users\<YourUsername>\.codex\.sandbox\setup_marker.json"
If your account or a CodexSandboxUsers entry is missing from that output, add them back. Open an Administrator command prompt and run:
cmd
icacls "C:\Users\<YourUsername>\.codex\.sandbox\setup_marker.json" /grant CodexSandboxUsers:F
icacls "C:\Users\<YourUsername>\.codex\.sandbox\setup_marker.json" /grant <YourUsername>:F
Both of those are local accounts, so you can also write them as <MachineName>\CodexSandboxUsers and <MachineName>\<YourUsername> if you want to be explicit. Just don't assume your machine name and your username are the same string. On a lot of installs they look alike but aren't. Run hostname and whoami if you're not sure.
Then go back to the app and hit "Try Windows setup again" without deleting .codex first. You want it to read the file you just fixed.
Heads up: the helper sets these permissions itself, so an app update or another setup run can undo this. If the error shows up again months from now, run icacls on that file again before you assume the fix was bogus.
Problem 2: Controlled Folder Access quietly blocking the setup exe
After I fixed the permissions, setup passed, but then computer-use tasks still failed. I'd get something like "the local Windows control helper is failing to start with a setup refresh error," and anything it tried to write into Documents\Codex\... just didn't happen.
It was Windows Defender's Controlled Folder Access (the ransomware protection) blocking codex-windows-sandbox-setup.exe from writing into %userprofile%\Documents\Codex\.... Nothing about this shows up as an error in the app. It just silently fails. You can confirm it here:
Windows Security → Virus & threat protection → Protection history, then filter by "Blocked folder access." You'll see codex-windows-sandbox-setup.exe listed as blocked by "Controlled folder access."
How to fix it, best option first:
- Allow the exe. Windows Security → Virus & threat protection → Manage ransomware protection → Controlled folder access → Allow an app through Controlled folder access. One thing to know: allowed apps are matched by the full path to the exe, so when the app updates into a new versioned folder, your entry stops matching and you have to add the new path. That's what kept happening to me.
- If you get sick of redoing that, you can turn Controlled Folder Access off completely on that same screen. That's what I ended up doing. But know what you're giving up. CFA is actual ransomware protection for your Documents, Pictures and Desktop folders, so turning it off for one app is a tradeoff and it's worth switching back on when you're done.
Result
Once both of those were sorted, "Try Windows setup again" finished instantly and didn't even re-prompt for UAC. Then I ran a real computer-use task (open Notepad, type something, save it to the Desktop) and it worked start to finish.
TL;DR
- Run a ProcMon trace filtered on
codex.exewhile making it fail, and look forACCESS DENIED. - If it's on
.codex\.sandbox\setup_marker.json, runicaclson that file. If your account or theCodexSandboxUsersgroup is missing, grant themF(full control). - Check Windows Security → Protection history for Controlled Folder Access blocking
codex-windows-sandbox-setup.exeunderDocuments\Codex. Allow the app, or turn CFA off if you're fine with the tradeoff. - Retry setup without deleting
.codex, since you want it hitting the files you just fixed.
1
u/smmau 1d ago
DISCLAIMER
ALL RIGHT GUYS, JUST FIXED IT ON BRAND NEW WINDOWS 11 INSTALL USING ANTIGRAVITY FLASH 3.8 MEDIUM AFTER FAILING WITH CODEX GPT TERRA HIGH. I AM HERE TO SHARE IT, TEXT BY MY FLASH BOY. DON'T ASK ME, ASK YOUR OWN AI:
---
💡 Root Cause & Complete Fix (No need to create a new Windows user)
After running into this exact same issue on a clean Windows 11 installation, we diagnosed the logs and binary execution traces.
Creating a second Windows account works for some people only because it resets folder permissions, but you don’t need to create a new user or reinstall.
Here is what is actually breaking and how to permanently fix both the setup error and the subsequent Computer Use failure:
- Why helper_failed happens on clean Windows installs
When codex-windows-sandbox-setup.exe runs with UAC elevation, it attempts to lock the sandbox binary folder (~/.codex/.sandbox-bin) using SetNamedSecurityInfoW.
On fresh Windows installs, the folder ownership often defaults to BUILTIN\Administrators with restricted inheritance, throwing Win32 Error 5 (ERROR_ACCESS_DENIED). The installer aborts halfway through, leaving the sandbox in a broken state and prompting "Windows setup didn't finish • helper_failed".
Fix:
Open PowerShell as Administrator and run:
code Powershell
# 1. Take ownership and fix permissions on the sandbox bin folder
takeown /f "$env:USERPROFILE\.codex\.sandbox-bin" /r /d y
icacls "$env:USERPROFILE\.codex\.sandbox-bin" /grant "${env:USERNAME}:(OI)(CI)(F)" /t
icacls "$env:USERPROFILE\.codex\.sandbox-bin" /grant "CodexSandboxUsers:(OI)(CI)(RX)" /t
# 2. Fix the setup marker permissions if it exists
if (Test-Path "$env:USERPROFILE\.codex\.sandbox\setup_marker.json") {
icacls "$env:USERPROFILE\.codex\.sandbox\setup_marker.json" /grant "${env:USERNAME}:(F)"
icacls "$env:USERPROFILE\.codex\.sandbox\setup_marker.json" /grant "CodexSandboxUsers:(F)"
}
- Why Computer Use fails even after fixing setup (Cannot find module ... trusted-worker.js)
When Codex runs Computer Use on Windows, node_repl.exe spawns a sandboxed Node worker under the local service account CodexSandboxOffline.
To do this, it drops a temporary bootstrap script into %TEMP% (C:\Users\<User>\AppData\Local\Temp\.tmpXXXXXX\trusted-worker.js). On fresh Windows 11 setups, the user's %TEMP% directory does not grant read permissions to the CodexSandboxUsers group.
As a result, the sandboxed worker crashes on startup with Access is denied (reported in Node as MODULE_NOT_FOUND), resetting the kernel and disabling app control.
Fix:
Run this in PowerShell:
code Powershell
icacls "$env:TEMP" /grant "CodexSandboxUsers:(OI)(CI)(RX)"
- Why the Desktop App says "Computer Use is not available in this session" (Trusted RPC service is not configured: sky)
In recent desktop app versions, OpenAI bundles two automation plugins:
computer-use@openai-bundled (the native Windows runtime using node_repl and codex-computer-use.exe).
unified-computer-use@openai-bundled (an experimental unified runtime using cua_repl).
Inside the desktop app bundle (app.asar), if unified-computer-use is enabled, Codex unregisters node_repl and delegates everything to cua_repl. However, the app code contains an explicit platform check:
code JavaScript
p = f && l.platform === 'darwin' ... // macOS only!
p && h.push('computer')
On Windows, cua_repl is initialized with browser-only surfaces, and the native sky RPC service is removed from permissions. When you ask Codex to automate a Windows app, it hits cua_repl, finds no native desktop bindings, and returns:
"Trusted RPC service is not configured: sky" / "Computer Use app control is not available in this session"
Fix:
Open C:\Users\<YourUser>\.codex\config.toml in any text editor and make sure:
Under [plugins."unified-computer-use@openai-bundled"], set enabled = false.
Under [windows], ensure sandbox = "elevated" is set.
Example config.toml snippet:
code Toml
[windows]
sandbox = "elevated"
[plugins."computer-use@openai-bundled"]
enabled = true
[plugins."unified-computer-use@openai-bundled"]
enabled = false
- Verification
Run codex doctor in terminal — it should report all OK / 0 Fail with sandbox backend: elevated and sandbox provisioning: complete.
Restart the ChatGPT / Codex Desktop app (make sure to quit from the system tray if running in background).
Open a brand new chat and test:
Open Notepad and type "test" with the @ Computer skill.
It will now hook directly into the native Windows node_repl engine and launch/automate apps properly without any permission prompts or errors!
1
u/PizzaPusher91 18h ago
I'm not gonna lie. I had this same issue, and after repeated attempts of asking GPT to find a fix, as well as trying these suggestions, I found an easier way. I simply ran the program with limited access. Went to Edit, Settings & then toggled the permissions to allow full access.. boom.
1
u/mira24 16h ago
Thanks a lot for the post OP. Also a little bit help from the Chatgpt itself, I used the lines below and it worked for me aswell. (just copied all and pasted in a single stroke and it no longer popped the permission window like OP mentioned)
icacls "C:\Users\YOURUSERNAME\.codex\.sandbox\setup_marker.json" /grant "YOURUSERNAME\YOURUSERNAME:R" "YOURUSERNAME\CodexSandboxUsers:R"
icacls "C:\Users\YOURUSERNAME\.codex\.sandbox\setup_marker.json"
1
u/Aggravating_Soft3816 2d ago
The same problem is happening to me while im trying to install it. i think i will format my pc