Windows setup fails before the UAC prompt, and both setup options are non-functional
What version of the Codex App are you using (From “About Codex” dialog)?
the lastest one
What subscription do you have?
I have a ChatGPT Plus subscription.
What platform is your computer?
Microsoft Windows NT 10.0.26100.0 x64
What issue are you seeing?
Description
After launching the new ChatGPT/Codex Windows desktop app, the application asks me to complete Windows setup.
After clicking "Finish setup", no real Windows User Account Control dialog appears. The application then displays a "Windows installation incomplete" page.
The failure page provides two options:
- Retry Windows setup
- Continue with limited access
Neither option works:
- "Retry Windows setup" repeats the same failure without triggering a real UAC prompt.
- "Continue with limited access" has no observable effect and does not open the usable application interface.
As a result, the application is blocked on this setup page and cannot be used.
What steps can reproduce the bug?
Steps to reproduce
- Install and launch the latest ChatGPT/Codex Windows desktop app.
- Wait for the "Finish setting up Windows" page to appear.
- Click "Finish setup".
- Observe that no real UAC prompt appears.
- The app displays "Windows installation incomplete".
- Click "Retry Windows setup".
- Observe that the same failure occurs again without a UAC prompt.
- Click "Continue with limited access".
- Observe that nothing happens and the application remains on the same page.
What is the expected behavior?
Clicking "Finish setup" should launch the required Windows setup helper, trigger a real UAC elevation prompt, and complete the Windows integration setup.
If Windows setup cannot be completed, clicking "Continue with limited access" should bypass the integration setup and open the application with reduced functionality.
<img width="818" height="571" alt="Image" src="https://github.com/user-attachments/assets/8d42ca0e-b59a-4ba4-8c9f-ee1d4f5947f1" />
Additional information
_No response_
29 Comments
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action
Tried reinstall, OS restart and "Run as administrator", nothing helps.
The last update made the app completely broken.
The issue was resolved by using CC Switch to first switch to a third-party API, and then switch back to the official subscription.
请问你是怎么解决的这个问题呀 我也遇到了一模一样的问题
Turned out these messages in UI were misleading and the root cause was incorrect value in
<user>/.codex/.config.toml.I backed up the whole .codex directory and deleted it. Then the app started working and I asked an agent to try to find the faulty values and it did.
Deleting everything in C:/Users/username/.codex and reinstalling the app fixed it. I had nothing to lose, because it was the first time I tried installing. Do NOT do this unless you're sure you have nothing in there you're deleting that you need. I don't know what's specifically stored in there.
I ran into the same issue. Codex had been working fine until I added the following entry to ~/.codex/config.toml:
``` toml
[projects.'C:\Users\jhc20\Documents\codex_projects\web']
trust_level = "trustesd"
I am seeing the same Windows setup loop on a Windows 11 ARM64 Oracle Cloud VM over RDP.
Environment:
Update: moving
%USERPROFILE%\.codexaside fixed the problem on this machine.Command used:
After renaming the
.codexdirectory, the ChatGPT Windows app entered normally. This confirms that, at least in this case, the "Complete Windows setup" / "Windows setup incomplete" screen was caused by something in the existing.codexstate/config rather than Microsoft Store installation, UAC, or the official app package itself.It would be helpful if the app surfaced the actual
.codexconfig/state error instead of showing the Windows setup flow.okay following the advice here let me login properly but has anyone figured out how to retrieve the old chats back? i have backed up the old .codex folder
I backed up
~/.codex/config.toml, then restarted the app so it could generate a new config file. The app is working normally again now.Confirmed workaround on the Microsoft Store Windows app (version
26.707.3748.0). The app was stuck on Finish Windows setup: the screen showed a UAC illustration, but no real UAC prompt appeared, and retrying failed.Renaming only the existing config file and restarting the app fixed it immediately:
This is safer than deleting the entire
.codexdirectory because it preserves sessions and other local state. After restart, the app generated a clean config and completed startup normally.This further suggests that the Windows/UAC setup page can be triggered by an invalid, stale, or unparsable
config.toml, rather than an actual Windows permission failure. It would help if the app surfaced the configuration parsing error directly.Same problem with windows beta app, so both of them are broken.
The issue lies in config.toml. Switching the CC Switch to a third-party API and then back can fix it. I think the switching process forces a refresh that overwrites the content of config.toml, inadvertently fixing the problem. This method can preserve your settings and sessions.
kindly pin my comment if it solved the issue.
Fixed with Claude :D
In my case there was a duplicated line in Codex config (config.toml).
Take care, Codex can modify it and break itself.
Probably OpenAI should provide correct error's type.
Same issue here.
Windows ChatGPT/Codex app version: 26.707.9564.0
Platform: Windows x64
After today’s update I am stuck on the “Finish Windows setup” screen.
No real Windows UAC prompt appears.
“Retry Windows setup” fails/does nothing useful.
“Continue with limited access” also does nothing.
Running the app as administrator does not fix it.
The app is completely unusable because it cannot get past this setup screen.
Confirmed workaround on the Microsoft Store Windows app (version 26.707.3748.0). The app was stuck on Finish Windows setup: the screen showed a UAC illustration, but no real UAC prompt appeared, and retrying failed.
Renaming only the existing config file and restarting the app fixed it immediately:
$cfg = Join-Path $env:USERPROFILE '.codex\config.toml'
if (Test-Path $cfg) {
$backupName = 'config.toml.bak-' + (Get-Date -Format 'yyyyMMdd-HHmmss')
Rename-Item -Path $cfg -NewName $backupName
}
This is safer than deleting the entire .codex directory because it preserves sessions and other local state. After restart, the app generated a clean config and completed startup normally.
This further suggests that the Windows/UAC setup page can be triggered by an invalid, stale, or unparsable config.toml, rather than an actual Windows permission failure. It would help if the app surfaced the configuration parsing error directly.
I found a working workaround for this issue.
Environment:
Workaround:
After switching Codex back to “OpenAI Official”, the real Windows setup process worked and I was able to enter the app normally.
Before this, my Codex configuration had previously been connected to a custom provider. CC Switch appears to have rewritten or normalized the Codex provider configuration.
This is only a workaround. I have not yet confirmed exactly which config field causes the setup page to fail.
<img width="1090" height="760" alt="Image" src="https://github.com/user-attachments/assets/1427bd96-19c1-405e-96da-efaa759c7c67" />
<img width="902" height="632" alt="Image" src="https://github.com/user-attachments/assets/afd54250-50d9-4c4d-9b71-e6cefe2635dc" />
<img width="1090" height="760" alt="Image" src="https://github.com/user-attachments/assets/d2342612-06f1-43c5-a0cd-537913b43949" />
Confirmed workaround on Windows 11 with the Microsoft Store ChatGPT/Codex app.
Environment:
9PLM9XGG6VKSOpenAI.Codex_26.707.9981.0_x64__2p2nqsd0c76g0Symptoms:
Ok.What fixed it:
%USERPROFILE%\.codex\config.tomlso the app starts without that config.PowerShell example:
After this, the app opened normally immediately.
In this case,
config.tomlhad previously been modified to add a custommodel_instructions_fileentry. I did not isolate whether that exact line was the only trigger, so the safer conclusion is that an existing or incompatible~/.codex/config.tomlcan incorrectly send the Windows app into the misleading setup/UAC loop.Important: renaming only
config.tomlis safer than deleting the whole.codexdirectory, because it preserves local history, sessions, and other state. The app should ideally surface the actual config parse/compatibility error instead of showing the Windows setup screen.works
I've discovered another critical root cause for the "Finish Windows setup" hang (where the UAC prompt never triggers) that is related to authentication rather than Windows privileges or system features.
The Underlying Issue
If your user session has expired or the OAuth refresh token has been revoked, the desktop app fails to fetch the cloud configuration bundle (
cloudConfigBundle) during startup:This causes the backend
windowsSandbox/setupStartcall to fail with a401 Unauthorized/Autherror. Instead of displaying a prompt to log out and log in again, the Desktop UI incorrectly routes this error to the "Finish Windows setup" gate, making it appear as a permissions/sandbox setup failure.This explains why some users find that resetting or deleting
config.tomldoesn't work for them: if the underlying cause is a revoked OAuth session inauth.json, the cloud config fetch will fail regardless of whetherconfig.tomlis clean.The Fix / Workaround
To break the loop and force the app to show the login screen:
%USERPROFILE%\.codex(usuallyC:\Users\<username>\.codex).auth.json.auth.jsontoauth.json.bak(or delete it).The app will now detect that no login session exists, skip the sandboxing gate, and successfully route you to the Sign In screen. Once you log back in, a fresh OAuth session will be established, and the app will open normally.
通过备份.codex,重启电脑后删除整个.codex,再重装chatgpt然后在ccs更换成官方订阅,验证chatgpt正常后新建ccs供应商解决这个问题
我认为出现这个问题的本质原因是config.toml以及auth.json文件出现错误 chatgpt无法检测到有效的配置误以为是未完成安装导致,所以根据上述的方法对这两个文件进行强制初始化 对于原有的.codex文件被删除可以让codex根据备份文件进行恢复
I updated Codex on Windows and afterward it wouldn’t get past the launch screen. Renaming:
to
config.toml.bakgot the app running again, but then all my projects were missing from the sidebar.Thankfully, nothing was actually deleted. The projects were still on disk, and the old Codex tasks were still in the database. The problem was the project-list state stored in the
.codexfolder.Before trying anything, completely close Codex and make a backup of:
Inside that folder, look for files with names similar to:
Find the newest one from before the update. That should be an older snapshot of the sidebar/project state.
The part that initially tripped me up is that Codex keeps two copies of its global state:
Restoring only the first one doesn’t work. When Codex starts, it can replace it using the
.bakfile, making it look like the recovery did nothing.With Codex fully closed, open Command Prompt and run the following, replacing the username and snapshot filename:
Then reopen Codex. My old projects appeared in the sidebar again.
I can reproduce this exact problem in the new ChatGPT/Codex Windows desktop app.
Environment
26.715.10079.026200.8875Administratorsgroup.Actual behavior
Troubleshooting already attempted
CodexSandboxOnlineandCodexSandboxOfflineaccounts already exist and remain members ofCodexSandboxUsers; they were not modified.The issue persists after a clean reinstall, so this appears to be a setup-helper/UAC launch failure rather than missing administrator rights.
Chiming in from a Windows 10 box (22H2 19045.6466), app OpenAI.Codex 26.721.3996.0.
TL;DR: the app-server couldn't deserialize my
~/.codex/config.toml, silently fell back to default settings (which use the elevated Windows sandbox), and the elevated sandbox setup then fails while granting a read-ACL on the app's own files underC:\Program Files\WindowsApps(TrustedInstaller-locked →SetNamedSecurityInfoWreturns error 5 / ACCESS_DENIED). Net effect: the app is wedged on the Windows-setup screen.---
Layer 1 — config silently ignored ("using defaults")
From the app-server log (
~/.codex/logs_2.sqlite, tablelogs):A
[[hooks]]array-of-tables in my config (added by a third-party tool) isn't valid for this build's schema — it expects ahooksstruct. So the app-server discards the entire config, including[windows] sandbox = "unelevated". The trap: the popular "setsandbox = "unelevated"" workaround silently does nothing while this error is present. The file is valid TOML syntactically (atomllib/tomlparser accepts it) — it's a schema mismatch, so it's easy to miss. The same error also fires on everyaccount/read/getAuthStatusreload.Layer 2 — elevated sandbox setup can't complete
With config defaulted, the app requires the elevated sandbox and loops
windowsSandbox/setupStart. The helper (codex-windows-sandbox-setup.exe, validly signed) does everything except the final read-ACL grant:→ persisted to
~/.codex/.sandbox/setup_error.jsonas{ "code": "helper_unknown_error", "message": "read ACL run had errors" }.%ProgramFiles%\WindowsApps\...DACLs are owned byNT SERVICE\TrustedInstaller; an elevated admin still can't rewrite them without taking ownership. In my logs this failed 432×, only ever on...\app\resources; everything else (sandbox users/group, firewall rules) succeeds, and there are zeroShellExecuteExW/ERROR_CANCELLED (1223)/ERROR_ELEVATION_REQUIRED (740)markers.---
Fix that worked for me
Invalid configuration; using defaultsand remove/repair the offending entry (for me: delete the[[hooks]]block from~/.codex/config.toml).[windows] sandbox = "unelevated"(now that it's actually honored).~/.codex/.sandbox/setup_error.json(keepsetup_marker.json).Relaunch → setup screen gone, app usable. Steps 2–3 alone did nothing until step 1 was fixed.
To check for Layer 1: search the app log (
~/.codex/logs_2.sqlite,logstable) for Invalid configuration; using defaults — any hit means your config is being dropped and the sandbox mode you set isn't applied.Suggested fixes
windows.sandboxwhen other keys are invalid.BUILTIN\Users/ the package SID; skip/soft-fail on%ProgramFiles%\WindowsApps\..., or take ownership beforeSetNamedSecurityInfoW.setup_error.jsonon a successful/deferred setup so a stale error doesn't wedge onboarding across updates.(Root-caused with Claude Code — full read-only investigation and a reversible fix.)
I'm seeing a similar issue on Windows 11 Business 25H2 with ChatGPT Desktop v26.721.4979.0. The app became permanently stuck on "Finish Windows setup". Both "Finish Windows setup" and "Continue with limited access" were non-responsive. Reinstalling, repairing, and resetting did not help. Deleting/renaming %USERPROFILE%\.codex\config.toml immediately resolved the problem.
I am experiencing the same blocking Windows setup failure.
I have already updated my system BIOS and verified that this is not a firmware issue.
Since updating the BIOS:
The only remaining blocker is the Codex desktop application's Windows setup loop described below.
Environment
OpenAI.Codex26.727.6591.0OpenAI.Codex_26.727.6591.0_x64__2p2nqsd0c76g010.0.26200, x64Mandatory Label\High Mandatory LevelActual behavior
Expected behavior
“Finish setup” should launch the actual elevated setup helper, display a real UAC prompt, complete the Windows sandbox/integration setup, and open Codex.
If elevated setup fails, “Continue with limited access” should open Codex with reduced permissions instead of leaving the application unusable.
Troubleshooting already completed
Get-AppxPackage OpenAI.Codex | Reset-AppxPackageGet-AppxPackage.%USERPROFILE%\.codex\config.tomland renamed it toconfig.toml.backupas a diagnostic precaution. However, the application had already been uninstalled at that point, so this workaround has not yet been tested against a fresh installed package.Important impact
This is not merely preventing use of the ChatGPT desktop interface. It completely blocks Codex from accessing and editing local development repositories, which stops my development workflow.
Please provide either:
I can provide screenshots of:
<img width="1090" height="760" alt="Image" src="https://github.com/user-attachments/assets/429f37ec-29d7-4ce1-9cbb-446ad8913014" />
UPDATE SOLUTION FOUND
Possible Root Cause / Workaround (Solved on my system)
After spending nearly two full days troubleshooting this, I wanted to share what ultimately solved the problem on my Windows 11 Pro workstation. Hopefully this saves someone else a lot of time.
Symptoms
I was experiencing exactly the symptoms described in this issue:
"Finish Windows setup" looped indefinitely.
Clicking Finish setup either returned to the same screen or displayed "Windows setup didn't finish."
Continue with limited access did nothing.
The desktop application was unusable.
Because Codex could not initialize, I had no access to my local Git repositories.
Things that were NOT the root cause
I ruled out a number of possibilities before finding the actual issue.
I verified or completed all of the following:
Updated ASUS ProArt Z790-CREATOR WIFI BIOS from 2703 → 3107
Windows Memory Diagnostic passed
No WHEA hardware errors
Administrator privileges verified
Repaired and reinstalled the application multiple times
Reset the package
Renamed config.toml
Investigated Codex logs
Investigated Event Viewer
Verified Windows security/UAC functionality
Interestingly, the BIOS update fixed several unrelated issues (speech recognition, MOTU 48 kHz audio, and general stability), but it did not resolve the Codex setup loop.
The breakthrough
The clue came from the installer itself.
When the installer attempted to finish setup, it redirected me toward Microsoft Store.
However...
Clicking View in Store did absolutely nothing.
Running:
Win + R
ms-windows-store:
produced:
We can't open this 'ms-windows-store' link.
Your device needs a new app to open this link.
That should never happen on a healthy Windows installation.
Diagnosis
Running:
Get-AppxPackage Microsoft.WindowsStore
returned nothing.
However:
Get-AppxPackage -AllUsers Microsoft.WindowsStore
returned the Store package, but it showed:
PackageUserInformation:
S-1-5-18 [S-1-5-18]: Staged
In other words:
Microsoft Store existed
but it was not registered for my user account
Fix
Re-registering the Microsoft Store package fixed the problem.
I ran:
$store = Get-AppxPackage -AllUsers Microsoft.WindowsStore
Add-AppxPackage -DisableDevelopmentMode -Register "$($store.InstallLocation)\AppxManifest.xml"
The command completed successfully with no output.
After that:
Win + R
ms-windows-store:
opened Microsoft Store correctly.
Result
After repairing the Store registration:
"Finish Windows setup" completed successfully.
ChatGPT opened normally.
Codex launched normally.
I was able to create/open Codex projects.
Codex successfully attached to my local Git repositories again.
Additional finding
While investigating the issue, I also discovered that my original:
%USERPROFILE%\.codex\config.toml
had become corrupted.
The file consisted almost entirely of zero bytes, and Codex logs repeatedly contained:
Invalid configuration; using defaults.
C:\Users\<user>\.codex\config.toml
key with no value, expected '='
This may have been caused by earlier system crashes.
However, this was NOT the blocker that prevented the setup loop from completing.
The application continued to fail until the Microsoft Store registration was repaired.
Recommendation
If you're seeing this setup loop, before spending hours reinstalling Codex or Windows, check whether the Microsoft Store protocol is functioning:
Win + R
ms-windows-store:
If that doesn't open Microsoft Store, verify whether the Store package is registered for your user account.
Repairing that registration completely resolved the setup loop on my system.