Codex on Windows: common problems and fixes
The problems people run into most with the Codex desktop app and CLI on Windows, many of them with a third-party model provider. Each comes from the issue threads linked under it. Checked on 2026-11-28; Codex changes quickly, so check the version you run.
Verify your email and get $0.35 of balance
1.The sandbox fails to set up, so no command runs
Why
Bugs in the Windows sandbox's setup in several versions: it tried to change permissions on files Codex itself had open, and failed on some localised Windows versions. It also fails when the .codex folder has the wrong owner.
Fix
Update the desktop app to 26.1007 or later (the CLI to 0.163.0 or later), sign out and restart Windows. If it still fails, add the lines below to config.toml to use the sandbox that doesn't need administrator rights, then restart Codex.
Status: Partly fixed. The most reported Windows problem, with more than 30 issues.
windows sandbox: setup refresh failed with status exit code: 1
apply_patch verification failed ... fs sandbox helper failed
os error 740 / os error 32# %USERPROFILE%\.codex\config.toml
[windows]
sandbox = "unelevated"Sources: openai/codex #51601, openai/codex #10601, openai/codex #29072
2.With a third-party provider, requests go out as the built-in model
Why
The desktop app sends the model chosen in its model menu and ignores model in config.toml. The menu lists only the models in a model catalog, so without one it offers OpenAI's models and every request fails at your provider.
Fix
Point model_catalog_url at your provider's catalog, in your provider's section of config.toml, if the provider serves one. Then fully quit and reopen Codex and pick the model in the menu. If the menu stays empty (it does on Windows when the provider signs in with env_key), save the catalog as a file and point model_catalog_json at it instead.
Status: Known behaviour that OpenAI tracks; bugs where the app drops the catalog are still open.
No available channel for model gpt-6.2-sol# %USERPROFILE%\.codex\config.toml
model_catalog_url = "https://<your provider>/v1/models"Sources: openai/codex #16984, openai/codex #29156, openai/codex #54881
3.stream disconnected, or Reconnecting… over and over
Why
Usually the setup in front of the model: a base URL without /v1, a relay that doesn't stream the Responses API, a proxy the app doesn't use, or a connection the relay cuts after a few minutes.
Fix
Make sure base_url ends in /v1 (these settings go in your provider's section of config.toml). Turning off WebSockets and raising the idle timeout helps with relays. Behind a local proxy, set HTTP_PROXY and HTTPS_PROXY to its address, and remove old OPENAI_BASE_URL variables.
Status: Mostly configuration; very common in Chinese communities.
stream disconnected before completion: stream closed before response.completed
Reconnecting... 1/5# %USERPROFILE%\.codex\config.toml
base_url = "https://<your provider>/v1"
supports_websockets = false
stream_idle_timeout_ms = 900000Sources: openai/codex #18960, openai/codex #56149, linux.do
4.EPERM on start or on a new chat when your Windows username isn't plain English letters
Why
The desktop app decodes the user folder's path wrongly when the name has Chinese, Korean, accented or other characters, so it can't create its folders.
Fix
Run the two commands below in Command Prompt to move Codex's data to a folder with a plain path, copy your config.toml into that folder (or your provider settings are gone), then restart Codex. Or use a Windows account with an English-only name.
Status: The start-up crash was fixed around 26.409, but the same bug shows up again in newer parts of the app.
Codex failed to start. EPERM: operation not permitted, mkdir 'C:\Users\�…\.codex\sqlite'setx CODEX_HOME "C:\CodexData"
setx CODEX_SQLITE_HOME "C:\CodexData\sqlite"Sources: openai/codex #13553, openai/codex #63251, CSDN
5.EPERM: operation not permitted, mkdir 'D:\' without a project folder
Why
A chat started without choosing a folder is stored in a default folder under Documents. When Documents is moved to another drive or synced by OneDrive, the app builds the wrong path and ends up writing to the root of a drive.
Fix
Choose a folder when you start a chat. Or set a plain local folder (not OneDrive) in Settings, General, under the folder for chats that don't belong to a project.
Status: The setting exists since early November 2026; the default is unchanged.
EPERM: operation not permitted, mkdir 'D:\'Sources: openai/codex #33515, openai/codex #22532
6.The desktop app won't start after an update
Why
An update failed to copy the app's bundled command-line program into place; it fails more often when the app is installed on a drive other than C:.
Fix
Install the next update. If the app is on another drive, uninstall it and reinstall it on C: from the Microsoft Store.
Status: Later updates fixed it for many people; the threads are still open.
Unable to locate the Codex CLI binary. Set CODEX_CLI_PATH or ensure the Electron resources include bin/codex.
spawn EINVALSources: openai/codex #40752, openai/codex #40715
7.PowerShell says running scripts is disabled
Why
Windows blocks scripts by default, and the command npm installs for Codex is a PowerShell script. It isn't a Codex bug.
Fix
Allow your own scripts with the command below, or run codex.cmd, or use Command Prompt instead of PowerShell.
Status: A one-time fix.
codex.ps1 cannot be loaded because running scripts is disabled on this system.Set-ExecutionPolicy -Scope CurrentUser RemoteSignedSources: Microsoft: about_Execution_Policies
8.After switching between your ChatGPT login and a provider, old chats are gone or fail
Why
Codex keeps chat history per provider, and the encrypted reasoning one provider saved can't be read by another.
Fix
Switch back to the provider a chat was made with to see and continue it. Continuing one chat across providers doesn't work yet.
Status: Open.
invalid_encrypted_content
The encrypted content ... could not be verified9.When your ChatGPT limit runs out, a third-party model can't send either
Why
The desktop app checks your ChatGPT plan's limits before sending, whichever provider the chosen model goes to.
Fix
Sign out of ChatGPT in Codex. If you use CC Switch, make a third-party provider the default in place of OpenAI Official, then fully quit and reopen Codex. Or wait for the limit to reset.
Status: Open.
10.A strict provider such as DeepSeek rejects a request with an invalid schema error
Why
The desktop app's automation tool is defined in a way only OpenAI accepts, so providers that check tool definitions strictly answer 400.
Fix
No confirmed workaround yet; it needs a fix from OpenAI.
Status: Open.
Invalid schema for function 'codex_app__automation_update': schema must be a JSON Schema of 'type: "object"', got 'type: null'Sources: openai/codex #36441, openai/codex #26234
11.A third-party provider answers 400 about X-OpenAI-Internal-Codex-Responses-Lite
Why
Codex's built-in model entries send an internal header that providers other than OpenAI reject.
Fix
Use your provider's own model names rather than the built-in ones, or have the relay drop the header.
Status: Partly fixed.
This model is not supported when using X-OpenAI-Internal-Codex-Responses-Lite.Sources: openai/codex #30224, openai/codex #31882
12.wire_api = "chat" is no longer supported
Why
Codex now speaks only the Responses API; the old Chat Completions setting is refused, even on a provider you don't use.
Fix
Set wire_api to responses in every provider in config.toml, and use a provider that serves the Responses API.
Status: By design.
Error loading config.toml: `wire_api = "chat"` is no longer supported. How to fix: set `wire_api = "responses"`wire_api = "responses"Sources: openai/codex #41816
13.Image or video models show up in the Codex model menu
Why
CC Switch's fetch models button used to add every model the key can use, images and video included, to Codex's menu. Picked as the chat model, they fail on every message.
Fix
Update CC Switch to 4.0.44 or later. Untick models you added before in the provider's model list, then restart Codex.
Status: Fixed in CC Switch 4.0.44 (27 November 2026).
Sources: farion1231/cc-switch #10026
14.The CLI refuses to start from an administrator terminal
Why
The CLI's new background server won't run with administrator rights.
Fix
Start Codex from a normal terminal, or skip the background server with the command below.
Status: Open.
Error: start the Windows daemon from a non-elevated terminal; shared clients must not inherit administrator privilegescodex --no-daemonSources: openai/codex #48074, openai/codex #48043
Using Codex with DeepSeek? HaryAI sets it up for you, model catalog included.
DeepSeek at 55% off the official price
Verify your email and get $0.35 of balance







