[Windows][WSL] Switching back to Windows Native fails with repeated UAC prompts and `config_load`; config changes do not persist
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 125k
- Forks
- 19.4k
- PR merge metrics
- PR metrics pending
Description
What platform is your computer?
Windows 11 x64 with WSL2 / Ubuntu.
Subscription
ChatGPT Prolite.
Codex App version
Current Windows desktop build installed as of 2026-09-05. I did not capture the exact About-version number before reproducing this issue.
What issue are you seeing?
Codex Desktop is effectively stuck in the WSL agent environment. Switching the app back to Windows Native does not complete successfully.
The app is currently configured with WSL in Settings:
Agent Environment = Windows Subsystem for Linux
Integrated terminal shell = WSL
The corresponding C:\Users\<user>\.codex\config.toml values were:
[desktop]
runCodexInWindowsSubsystemForLinux = true
integratedTerminalShell = "wsl"
I manually changed only those two values to:
runCodexInWindowsSubsystemForLinux = false
integratedTerminalShell = "powershell"
After saving and reopening the app, Settings still showed WSL for both the Agent Environment and integrated terminal shell. In other words, the manual configuration change was either ignored or rewritten by the app.
I then tried switching the Agent Environment to Windows Native directly in the UI. Codex shows a Windows setup screen asking for a one-time administrator authorization. The Windows UAC prompt appears normally and identifies ChatGPT / OpenAI LLC as the verified publisher.
Even after approving the UAC prompt repeatedly, setup never completes. The app returns to:
Finish Windows setup
Windows installation did not finish
config_load
Pressing “Retry Windows setup” and approving UAC again produces the same result every time.
This leaves the app stuck: WSL mode is problematic, but switching back to Windows Native cannot complete because the Windows setup path repeatedly fails with config_load.
WSL itself is working
This does not appear to be a general WSL failure.
Cursor is connected to WSL/Ubuntu successfully and projects stored under the native WSL filesystem continue to work normally. For example, a project under a path like:
/home/<user>/projects/...
can be opened in Cursor and development processes such as npx convex dev can run normally.
Running wsl --shutdown temporarily disconnected Cursor, as expected, but reconnecting to Ubuntu restored the project and files normally. No WSL files were lost.
The problem appears specific to Codex Desktop's Agent Environment / Windows provisioning and configuration persistence.
Steps to reproduce
- Run Codex Desktop on Windows 11 with WSL2 / Ubuntu installed.
- Set:
Agent Environment = Windows Subsystem for Linux
Integrated terminal shell = WSL
- Confirm that
C:\Users\<user>\.codex\config.tomlcontains:
runCodexInWindowsSubsystemForLinux = true
integratedTerminalShell = "wsl"
- Fully close Codex Desktop.
- Manually change those values to:
runCodexInWindowsSubsystemForLinux = false
integratedTerminalShell = "powershell"
- Save the file and reopen Codex Desktop.
- Observe that Settings still shows WSL as the Agent Environment and terminal shell.
- In Settings, attempt to switch Agent Environment to Windows Native.
- Codex displays the “Finish Windows setup” screen and triggers a Windows UAC prompt.
- Click Yes on the UAC prompt.
- Setup fails and returns to:
Windows installation did not finish
config_load
- Click Retry Windows setup and approve UAC again.
- The same
config_loadfailure repeats indefinitely.
Expected behavior
Either of the following should work reliably:
- Changing the Agent Environment to Windows Native in the UI should complete Windows provisioning after one successful UAC approval; or
- The persisted
config.tomlvalues should be respected on restart when set to:
runCodexInWindowsSubsystemForLinux = false
integratedTerminalShell = "powershell"
After switching, Settings should show:
Agent Environment = Windows Native
Integrated terminal shell = PowerShell
while WSL/Ubuntu remains independently usable by other applications such as Cursor.
Actual behavior
- Codex remains configured for WSL after manually changing the config file.
- Switching to Windows Native through the UI launches Windows setup.
- UAC approval succeeds, but Codex reports
config_loadand never finishes Windows setup. - Retrying produces the same loop.
Impact
This blocks normal use of Codex Desktop on the machine. The user can continue developing inside WSL with Cursor, but Codex Desktop cannot be reliably moved back to Windows Native and the WSL integration remains problematic.
Troubleshooting already attempted
- Verified
.codexdirectory and active config files. - Inspected
.codex-global-state.jsonfor WSL-related state. - Located
[desktop]settings inconfig.toml. - Created backups before editing configuration.
- Changed only:
runCodexInWindowsSubsystemForLinux = true→falseintegratedTerminalShell = "wsl"→"powershell"
- Saved and restarted the app.
- Confirmed the UI still reported WSL afterward.
- Ran
wsl --shutdownonce to clear WSL state; WSL restarted normally later and existing projects were intact. - Tried the in-app Windows Native switch.
- Approved the Windows UAC prompt multiple times.
- Retried Windows setup multiple times.
- Failure remains
config_load.
Additional information
Screenshots are available showing:
- Settings with
Agent Environment = Windows Subsystem for LinuxandShell = WSL. config.tomlafter being manually changed tofalse/powershell.- The “Finish Windows setup” screen with the OpenAI/ChatGPT UAC prompt.
- The failure message:
Windows installation did not finish
config_load
No credentials, tokens, repository secrets, or private source code are required to reproduce the issue.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the Windows 11/WSL2 flow using the reported Agent Environment and integrated shell settings. Start by comparing config.toml with .codex-global-state.json while switching to Windows Native and retrying the UAC setup; done means the Windows setup completes once and the selected values persist after restart without the config_load loop.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- desktop, operating-systems
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100