Repository navigation
Description
Summary
With a working proxy and a valid ChatGPT login, plain codex fails immediately during TUI bootstrap:
Error: account/read failed during TUI bootstrap: account/read failed: workspace routing discovery failed (code -32603)
Passing an apparently unrelated CLI config override makes startup and model interaction succeed:
codex -c 'log_dir="/tmp/codex-test-log"'
# also works:
codex -c 'model_reasoning_effort="medium"'Setting log_dir at the top level of config.toml does not fix it, and temporarily removing config.toml entirely still fails. Reproduced on 0.156.1 and after upgrading to 0.162.1.
This seems closely related to #48600 and #49827; this report adds controlled proxy-protocol and configuration-source comparisons.
Environment
- Ubuntu 22.04 LTS in a headless Docker container, x86_64
- Codex standalone CLI 0.156.1 and 0.162.1
- ChatGPT account authentication (reauthentication attempted)
- Proxy required for network access; Ninja Desktop Lite using Ninja 2.0 subscription
- Local listening endpoints: HTTP
127.0.0.1:7899, mixed127.0.0.1:7897, SOCKS5127.0.0.1:7898 - No TUN
Controlled reproductions
| Proxy environment | Invocation | Result |
|---|---|---|
HTTP-only HTTP_PROXY/HTTPS_PROXY port 7899, ALL_PROXY unset |
codex |
Fails in account/read |
SOCKS5-only ALL_PROXY=socks5h://127.0.0.1:7898, HTTP proxy vars unset |
codex |
Fails |
| HTTP-only port 7899 | codex -c 'log_dir="/tmp/codex-test-log"' |
Works, including model reply |
| Mixed HTTP proxy port 7897 | codex |
Fails |
| Mixed HTTP proxy port 7897 | codex -c 'log_dir="/tmp/codex-test-log"' |
Works |
| Valid proxy enabled | codex -c 'model_reasoning_effort="medium"' |
Works, model interaction completes |
| No proxy | codex -c 'log_dir="/tmp/codex-test-log"' |
Fails |
The default failure was timed at 1.630 seconds (time codex), which is not consistent with a 15-second timeout being exhausted.
The proxy itself is verified: Git/Python/curl HTTPS work, and a proxied unauthenticated GET to https://chatgpt.com/backend-api/codex/responses reaches the endpoint and returns HTTP 405 with Allow: POST. The working -c invocation completes authenticated model calls.
Configuration-source comparison
log_dir = "/home/rmh/.codex/log"is confirmed by Pythontomllibto be a top-level key in~/.codex/config.toml.- Plain
codexstill fails with that setting. codex -c 'log_dir="/home/rmh/.codex/log"'succeeds, although it specifies the same path.codex -c 'log_dir="/tmp/codex-test-log"'also succeeds.- Temporarily moving
config.tomlaway and launching plaincodexstill fails. The configuration was preserved and restored.
History commands
- Plain
codex resume --allfails during bootstrap. codex -c 'log_dir="/tmp/codex-test-log"' resume --allsuccessfully lists existing local sessions.codex agentsalso showedaccount/readdiscovery errors in prior tests.
Expected
A working ChatGPT-authenticated CLI behind a working HTTP/SOCKS5 proxy should initialize without requiring an unrelated -c configuration override. Passing the same effective log_dir via config file vs command line should not affect account routing discovery.
Actual
The default startup path fails during account/read, while two unrelated CLI overrides allow normal operation with the built-in openai provider.
Questions
- Does the presence of CLI
-coverrides change how config layers, proxy settings, or workspace-routing discovery are initialized? - Is there a way to expose the underlying HTTP/transport error behind the generic
workspace routing discovery failedmessage? - Can this behavior be fixed without requiring a CLI-only workaround?
Workaround
With the proxy enabled:
codex -c 'log_dir="/tmp/codex-test-log"'This is reproducible but does not explain the failure mechanism. No tokens, subscription URLs, or private session contents are included here.
Activity
github-actions commentedon Oct 10, 2026
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
-c log_diroverride #52775Powered by Codex Action
Baifeng76 commentedon Oct 10, 2026
Follow-up:
--no-daemonworks — likely shared background server pathI found a much more direct reproducer and workaround:
With the same shell, proxy environment, authentication, and configuration, running:
fails in ~1.63 seconds with
account/read failed: workspace routing discovery failed (code -32603), butsuccessfully starts and works normally, without needing any
-cconfiguration override.I also see the following message when launching with
-c:This appears to explain the previously surprising observation that both
-c log_dir=...and-c model_reasoning_effort=...work: those arguments select embedded mode rather than using the shared background server. The issue is therefore likely specific to the shared background server / daemon account-read or workspace-routing path, rather than to either configuration value itself. I have not identified the underlying server-side or network-level cause.Current clean workaround:
# With the working proxy already configured: codex --no-daemonThis is preferable to the unrelated
-c log_diroverride. Please investigate whyaccount/readfails via the shared background server but succeeds in embedded mode.vasilbekk commentedon Oct 12, 2026
+1
wenzhaoabc commentedon Oct 12, 2026
I also meet this bug. But I add a
.envfile in~/.codexand restart codex, and it works.prashan-s commentedon Oct 14, 2026
Also not working for
❯ codex --yolo
Error: account/read failed during TUI bootstrap: account/read failed: failed to load workspace requirements (code -32603)
ziheng5 commentedon Oct 15, 2026
Environment
Summary
When running
codex --no-daemonorcodex -c "xxx", Codex launches in "Embedded Mode" without any issues. This suggests that the problem likely lies with the shared background server used by Codex by default—a situation similar to the issue described in Issue #41188.My local version of Codex is 0.162.1. Upon running the command below in the terminal, the output showed
"appServerVersion":"0.160.0":This indicates the mismatch between the version of the background service and the actual version of the Codex application.
The background service was updated to version 0.162.1, bringing it in line with the application version after executing the command below:
Following this, I tried running
codexdirectly from the command line again, and it launched successfully!It appears to be a flaw in the codex's own update strategy: when the codex is updated, the corresponding update for the App Server version is overlooked, leading to a version mismatch that causes startup failure. 🤔
bboygun commentedon Oct 15, 2026
Workaround: Restarting the daemon fixed the issue (no version mismatch)
I encountered the same issue on Linux with Codex CLI
0.162.1, using an HTTP proxy.Symptoms:
codexfailed with:codex login statusshowedLogged in using ChatGPT.curlrequest tohttps://chatgpt.com/backend-api/wham/accounts/checkreturned HTTP 401 (expected without authentication) in approximately 0.46 seconds.codex --no-daemonworked normally.Daemon version check:
I ran:
The output confirmed that all versions matched:
{ "status": "running", "backend": "pid", "managedCodexVersion": "0.162.1", "cliVersion": "0.162.1", "appServerVersion": "0.162.1" }Solution:
Simply restarting the daemon resolved the issue:
After the restart, running
codexdirectly worked again without--no-daemonor any configuration overrides.Observation:
Unlike the previously reported version mismatch, my CLI and App Server were already on the same version (
0.162.1).This suggests that the issue may also be related to stale daemon state, inherited proxy environment variables, or connection state within the long-running daemon process.
I haven't identified the exact root cause, but restarting the daemon was sufficient to restore normal functionality.
Tohrusky commentedon Oct 15, 2026
thanks
Baifeng76 commentedon Oct 20, 2026
This also works for me, thanks!