"Workspace routing discovery" in Codex is the check it makes right after sign-in to find which OpenAI backend your ChatGPT workspace uses. "Timed out" means the check did not finish within 15 seconds, "failed" means it ended in an error other than 401, and "unauthorized (401)" means the saved login was rejected.
OpenAI's documentation does not mention this error. This page is based on OpenAI's Codex documentation, the public openai/codex source code, the code inside the macOS desktop app, and public replies from OpenAI staff. This site is not affiliated with OpenAI.
What the end of the message tells you
The end of a Codex "workspace routing discovery" error tells you what went wrong, and the app you see it in decides which fix applies.
| You see | What it means | Go to |
|---|---|---|
| "workspace routing discovery timed out" | The check did not finish in 15 seconds | CLI or SSH host: restart the background server. Extension: end old Codex processes. Desktop app: run the network checks. In the middle of a task: what fills the 15 seconds |
| "workspace routing discovery failed" | The check got an error: no connection, a certificate problem, or an answer such as 403 or 404 | CLI or SSH host: restart the background server. Extension: end old Codex processes. Desktop app: sign in once with the CLI. Then, in any app: what sits between Codex and chatgpt.com |
| "workspace routing discovery unauthorized (401)" | OpenAI rejected the saved login | Sign in on the machine that shows it |
| "Workspace routing is unavailable", status 432, or "Account authentication unavailable" | The desktop app has no usable workspace for your account | Desktop app: 432 |
| "selected workspace missing from routing discovery", "duplicate workspace in routing discovery" | OpenAI's list of your workspaces lacks yours, or has it twice | Missing: sign out and in once, then contact support. Duplicate: contact support |
"account/read failed … (code -32603)" in the CLI and "Error running remote compact task: …" in a long chat wrap the same check, so read the words at the end. "Failed to load workspace requirements" and "Token exchange failed" are different errors. "Couldn't load workspace settings" in the desktop app is too, unless "workspace routing discovery" or 432 appears with it.
CLI, VS Code and SSH: restart the background server
When the Codex CLI shows "workspace routing discovery timed out" or "failed", restarting the background server often clears it. In an editor extension, end the old Codex processes and reopen the editor. Nobody reports a server restart fixing the desktop app. The CLI connects to a server that stays running between sessions, so updating the CLI does not always update the server. Restarting can interrupt tasks that are still running.
-
In the CLI, restart the server. If the CLI still opens, type
/daemonand choose Restart background server (Developer commands). If it doesn't open, run:bashcodex app-server daemon restartFor an SSH host, run it on that host.
-
In VS Code or another editor, end the old Codex processes. The extension ships its own copy of Codex. Close every editor window and check that no Codex process is left. On macOS, Linux or the remote host, this ends all of them, including running tasks:
bashpkill -u "$USER" -x codexOn Windows, end
codex.exein Task Manager. Then reopen the editor. -
In the CLI, start Codex without the server. If the restart didn't help, this shows which side is broken:
bashcodex --no-daemonIf Codex now opens, the old server is the problem. Run
codex app-server daemon versionto see whether the CLI and the server differ, then update and restart the server. OpenAI's Codex maintainer: update and restart the background app-server, in a reply about a related startup error, posted from the maintainer's account and marked "(response from codex)".If you get the same error, the server isn't the cause. Go on to the network checks.
"Failed": check what sits between Codex and chatgpt.com
Most "workspace routing discovery failed" cases in Codex that were traced to a cause came down to the network, certificates or security software between that computer and OpenAI. Opening chatgpt.com in a browser doesn't rule those out, because Codex makes this request itself. Codex leaves the HTTP status out of the error, so find it with these steps.
-
Run
codex doctorand read three lines: network, websocket and reachability.bashcodex doctorIt doesn't run this exact check, but it tests the same path. "TLS handshake or certificate validation failed" or "connect failed" points to your network, certificates or security software. "reachable (HTTP 405)" is normal.
With only the macOS app installed, use its own copy:
bash"/Applications/ChatGPT.app/Contents/Resources/codex-cli/CodexCLI.app/Contents/MacOS/codex" doctor -
Try a phone hotspot once. If Codex works there, the problem is the first network. If it fails in the same way, look at the computer or the account.
-
Check antivirus, VPN clients and firewalls. For "failed" and "timed out", allowing Codex and OpenAI's hosts in the one that interferes, or removing or replacing it, often clears the error. Pausing it may not be enough. Don't leave your computer without protection. On a work computer, ask IT.
-
On a company network, ask IT to allow HTTPS to chatgpt.com. OpenAI's domain list includes
*.chatgpt.com, but its WebSocket table lists onlywss://chatgpt.com/for Codex (Network recommendations for ChatGPT errors on web and apps). This check is an ordinary HTTPS request to chatgpt.com, so both must pass. Sign-in itself uses auth.openai.com. A network that allows openai.com and blocks chatgpt.com lets you sign in and then fails here. -
Fix certificate settings.
- Your company inspects HTTPS: OpenAI says to set
CODEX_CA_CERTIFICATEto a PEM bundle before logging in (Authentication). Set it in the shell or the system. Codex skips names that start withCODEX_when it reads~/.codex/.env(Codex source: the .env filter). - You start Codex from an Anaconda terminal: Anaconda can set
SSL_CERT_FILE, which Codex reads too. Removing it in that terminal helps in rare cases. In PowerShell, runRemove-Item Env:SSL_CERT_FILE. On macOS or Linux, rununset SSL_CERT_FILE. Then start Codex or the editor from the same terminal. - The clock is wrong: a wrong date on the computer or the SSH host can make every certificate look invalid.
- Your company inspects HTTPS: OpenAI says to set
-
If you normally go online through a proxy, remember that the browser and Codex can take different routes. OpenAI's experimental system proxy setting,
respect_system_proxy, rarely fixes this error. -
Look for a 404. If
codex doctorshows "HTTP 404" on the websocket line, or Codex prints "404 Not Found" forbackend-api/codex, and every Codex app fails with the same account, a local setting is unlikely. Check status.openai.com, then contact OpenAI through help.openai.com with the request ID. Waiting can help in this 404 case. Don't count on it for the other cases.
"Timed out": 15 seconds, and not only the network
"Workspace routing discovery timed out" means Codex did not finish the whole check within 15 seconds (Codex source: the 15-second limit). That time covers loading your settings and your organization's cloud settings, waiting for an earlier check, and the request. If the direct route to chatgpt.com stalls, 5 of the 15 seconds pass before Codex tries the system proxy. So a slow VPN or a busy computer can cause it on a working connection.
- At sign-in or startup: in the CLI, restart the background server. In an extension, end the old Codex processes. In the desktop app, or if those don't help, run the network checks. In the desktop app you can also try one CLI login. Pause large downloads. If it happens each time the computer starts, the app may be starting before your network or proxy is ready: turn off Launch at login in the app's settings and open it later.
- In the middle of a task, or in "Error running remote compact task": having several tasks open at once is common in these cases. Run fewer at a time. Quitting the desktop app completely and reopening it helps only temporarily.
Codex doesn't save a failed check: "A later read retries failed discovery" (codex-app-server README). You don't need to clear anything before you try again.
Unauthorized (401): sign in on that machine
"Workspace routing discovery unauthorized (401)" in Codex means OpenAI rejected the saved login, even after Codex tried to renew it. For an SSH project, the machine to fix is the remote host, not your laptop.
- Sign in there. Run
codex login. Without a browser, runcodex login --device-auth. Device code login must first be enabled in your ChatGPT security settings, or by an admin in the workspace permissions (Authentication). - If the 401 stays, restart the background server on that machine, especially after an account or plan change, with
codex app-server daemon restart. A running Codex can pick up a new login by itself, but an old server may still hold the old one. - Test with a real prompt, not with
codex login status. That command only reads the login saved on the computer (Codex source: login status), so "Logged in using ChatGPT" doesn't prove that OpenAI still accepts it.
This doesn't clear every 401. If a fresh sign-in on that machine still gets one, contact OpenAI Support.
Since Codex 0.166.0, a 401 whose renewal is refused for good can appear as "Your access token could not be refreshed" instead. For that, see Codex: your access token could not be refreshed.
Desktop app: 432 or "Account authentication unavailable"
"Workspace routing is unavailable" with status 432 isn't an HTTP response from OpenAI. In the macOS app's code (version 26.1120.50957), the desktop app sets 432 itself before any request is sent, when it can't get your login or your workspace. That happens after a "failed" or "timed out" check, when the saved login has no workspace ID, or when the app runs the terminal CLI 0.155.0 or 0.155.1 instead of its own copy of Codex. OpenAI Support staff: the 432 error shows the app had trouble loading your workspace, and the error alone doesn't show whether an account was flagged.
-
Quit the app completely, sign in once with the CLI, and reopen it. With "failed" or 432, this often works, but not for everyone. Signing in again inside the app rarely does. On macOS, the app has its own CLI:
bash"/Applications/ChatGPT.app/Contents/Resources/codex-cli/CodexCLI.app/Contents/MacOS/codex" loginOn Windows, it is
codex.exe, in a folder under%LOCALAPPDATA%\OpenAI\Codex\bin. In PowerShell, these two lines find it and start the sign-in:powershell$cli = Get-ChildItem "$env:LOCALAPPDATA\OpenAI\Codex\bin" -Recurse -Filter codex.exe -File | Sort-Object LastWriteTime -Descending | Select-Object -First 1 -ExpandProperty FullName & $cli loginIf you have the Codex CLI in your terminal,
codex loginworks too. -
On Windows, check
CODEX_CLI_PATH. It makes the app run another copy of Codex. Clear it only if this prints a path:powershell[Environment]::GetEnvironmentVariable("CODEX_CLI_PATH", "User")To clear it, run the next line, then quit and reopen the app:
powershell[Environment]::SetEnvironmentVariable("CODEX_CLI_PATH", $null, "User") -
If "failed" or "timed out" appears too, fix that part first. 432 is then only its side effect.
-
If 432 is the only clue and the CLI answers prompts with the same account, suspect a login without a workspace ID. This is common when 432 is the only error. The app-server "does not guess a workspace" for such a login (codex-app-server README). Changing networks or restarting the app-server doesn't add the ID. Keep working in the CLI or on chatgpt.com.
-
Contact OpenAI Support through help.openai.com, because in-app feedback can fail in this state too. Send the app version, the exact line, the time, and whether the CLI and chatgpt.com work.
For "selected workspace missing from routing discovery", the saved login may point to a workspace that no longer exists. Quit the app and sign out and in once: run codex logout, then codex login. With only the app installed, run the step 1 command with logout in place of login (on Windows, & $cli logout), then the step 1 command itself. This signs Codex out on that computer. If the error stays, or if it says "duplicate workspace", go straight to step 5: signing in repeatedly doesn't change the workspace list that OpenAI returns.
Fixes for this error that don't hold up
For Codex "workspace routing discovery failed", nobody reports a reinstall fixing it, updating rarely helps, and an npm update doesn't reach the desktop app. These and other common suggestions:
| Common advice | What to expect |
|---|---|
| Reinstall, repair or reset the app | Skip it. There is no evidence that it helps. |
| Sign out and in again inside the app | Rarely helps. Use the CLI login instead. |
Delete auth.json |
Nobody reports this clearing "failed", "timed out" or 432. |
| Update Codex | Rarely helps. The newest stable CLI, 0.172.0 (November 24, 2026), still has the same check. |
npm install -g @openai/codex@latest |
It updates the terminal CLI. The desktop app and the editor extension use their own copies. |
| "It's a 0.155.x bug that an update fixed" | Versions 0.155.0 and 0.155.1 don't contain this check, so they can't print "discovery failed". The first stable version with it is 0.156.0. They matter only for the desktop app's 432. |
| Sign out old sessions on chatgpt.com | Helps only in rare cases, and it signs out those devices too. |
| Use an API key | API keys skip this check (codex-app-server README). You then pay standard API rates, and some features that rely on ChatGPT workspace access or cloud services are limited or unavailable (Authentication). |






