Skip to content

Windows: bundled Codex runtime causes workspace routing timeout and repeated login; using external CODEX_CLI_PATH fixes login persistence but ChatGPT Memory becomes unavailable #47145

Open

Description

@ysinjoro-coder

What version of the Codex App are you using (From “About Codex” dialog)?

26.915.4065.0

What subscription do you have?

plus

What platform is your computer?

Microsoft Windows NT 10.0.26200.0 x64

What issue are you seeing?

The Codex/ChatGPT Desktop app does not reliably restore my authenticated ChatGPT session after restarting Windows.
When the app uses its bundled Codex executable, I frequently have to log in again after rebooting the computer.
The logs suggest that the stored authentication itself may still exist, but workspace routing initialization fails during startup.
A particularly interesting detail is that getAuthStatus completes without an error, while account/read fails after approximately 10.9 seconds:

[AppServerConnection] response_routed
durationMs=10940
errorCode=-32603
method=account/read

[AppServerConnection] response_routed
durationMs=10940
errorCode=null
method=getAuthStatus

[electron-message-handler] Request failed
error={"code":-32603,"message":"workspace routing discovery timed out"}
method=account/read

Immediately afterward, authenticated requests fail because the workspace changes or cannot be resolved:

errorMessage="Authenticated workspace changed"
routePattern=/wham/tasks/list
status=499

errorMessage="Authenticated workspace changed"
routePattern=/wham/usage
status=499

The login flow subsequently finishes unsuccessfully:

[electron-message-handler] account_login_completed
success=false

The same startup session later repeatedly reports:

error={"code":-32603,"message":"workspace routing discovery timed out"}

and authenticated API requests fail with HTTP status 432:

errorMessage="Workspace routing is unavailable"
routePattern=/wham/tasks/list
status=432

errorMessage="Workspace routing is unavailable"
routePattern=/wham/usage
status=432

The bundled executable selected by the app is logged as something similar to:

C:\Users<redacted>\AppData\Local\OpenAI\Codex\bin<runtime-id>\codex.exe
Important workaround / behavioral difference

I also have Codex CLI installed globally through npm.

Its native executable is located at:

D:\nodejs\node_modules@openai\codex\node_modules@openai\codex-win32-x64\vendor\x86_64-pc-windows-msvc\bin\codex.exe

If I set:

CODEX_CLI_PATH=D:\nodejs\node_modules@openai\codex\node_modules@openai\codex-win32-x64\vendor\x86_64-pc-windows-msvc\bin\codex.exe

and restart the Desktop app, the repeated-login problem disappears. The app can keep me logged in across computer restarts.

However, this introduces another problem: ChatGPT Memory / previously available personalized memory is no longer available in the Desktop app.

Therefore, I currently see two different behaviors:

Bundled Codex runtime:
ChatGPT Memory available / normal ChatGPT context
but authentication does not persist reliably after reboot
and workspace routing times out.

External Codex CLI via CODEX_CLI_PATH:
Authentication persists correctly after reboot
but ChatGPT Memory / personalized memory is unavailable.

The same ChatGPT account is being used.

This makes me suspect there may be a difference between the workspace/account initialization performed by the bundled app-server runtime and the externally installed Codex CLI.

Relevant log sequence
method=account/read
durationMs=10940
errorCode=-32603

method=getAuthStatus
durationMs=10940
errorCode=null

error={"code":-32603,"message":"workspace routing discovery timed out"}

errorMessage="Authenticated workspace changed"
status=499

account_login_completed
success=false

errorMessage="Workspace routing is unavailable"
status=432
routePattern=/wham/tasks/list

errorMessage="Workspace routing is unavailable"
status=432
routePattern=/wham/usage

No credentials or tokens are included in this report.

What steps can reproduce the bug?

Install the Codex/ChatGPT Desktop app on Windows.
Make sure CODEX_CLI_PATH is not set:

Remove-Item Env:CODEX_CLI_PATH -ErrorAction SilentlyContinue

[Environment]::SetEnvironmentVariable(
    "CODEX_CLI_PATH",
    $null,
    "User"
)

Start the Desktop app and log in using a ChatGPT account.
Verify that the app works normally after logging in.
Restart Windows.
Open the Desktop app again.
The app may fail to restore the authenticated workspace and require login again.
Inspect the logs. Errors such as the following appear:
workspace routing discovery timed out

followed by:

Workspace routing is unavailable

with HTTP status:

432
As a workaround, install Codex CLI using npm and locate its native Windows executable.

For example:

Get-ChildItem "$(npm root -g)\@openai\codex" `
    -Recurse `
    -Filter codex.exe `
    -ErrorAction SilentlyContinue |
    Select-Object -ExpandProperty FullName
Set CODEX_CLI_PATH to the native executable rather than the npm .cmd or .ps1 wrapper:
[Environment]::SetEnvironmentVariable(
    "CODEX_CLI_PATH",
    "D:\nodejs\node_modules\@openai\codex\node_modules\@openai\codex-win32-x64\vendor\x86_64-pc-windows-msvc\bin\codex.exe",
    "User"
)

Restart the Desktop app.
With this configuration, the repeated-login problem disappears and login survives Windows restarts.
However, ChatGPT Memory / personalized memory that is available when using the bundled runtime is no longer available in the Desktop app.

What is the expected behavior?

The bundled Codex runtime should:

restore the existing ChatGPT authentication after a Windows restart;
successfully restore/discover the authenticated workspace;
not require the user to log in again after every reboot;
provide the same ChatGPT account features, including Memory/personalization, regardless of whether the bundled runtime or a compatible external Codex CLI is used.

Additional information

No response

Activity

  1. added
    app
    on Sep 22, 2026
  2. added
    bug
    windows-os
    auth
    app-server
    connectivity
    on Sep 22, 2026
  3. github-actions commented on Sep 22, 2026

    @github-actions
    Contributor
  4. guiwushengzhe-prog commented on Sep 23, 2026

    @guiwushengzhe-prog

    Additional A/B observation on Windows that may help other users recover the account UI after using the external-runtime workaround.

    Environment

    • Codex Windows app: 26.917.6896.0
    • External Codex CLI: 0.155.1 (npm global install, native codex.exe)
    • PowerShell 7.6.6

    Before the workaround
    Across the recent desktop logs I counted:

    • Workspace routing is unavailable: 1845
    • status=432: 1854
    • /settings/user: 129
    • /wham/usage: 500

    The account menu was degraded (email still shown, but account-only UI such as Invite friends was missing).

    Step 1 — external runtime
    I set CODEX_CLI_PATH to the native npm-installed executable and restarted Codex Desktop.

    I verified with Win32_Process that the running process was actually:

    ...\AppData\Roaming\npm\node_modules\@openai\codex\node_modules\@openai\codex-win32-x64\vendor\x86_64-pc-windows-msvc\bin\codex.exe
    

    After that, the new desktop session showed:

    • Workspace routing is unavailable: 0
    • status=432: 0
    • workspace routing discovery timed out: 0

    So the external runtime did remove the routing failure in this session.

    However, the Invite friends entry was still missing.

    Step 2 — important recovery step
    I then removed the user-level override:

    [Environment]::SetEnvironmentVariable(
        "CODEX_CLI_PATH",
        $null,
        "User"
    )

    After fully exiting and restarting Codex Desktop, the account UI recovered, including Invite friends.

    So, for users who try the external-runtime workaround, a useful recovery sequence may be:

    1. Temporarily point CODEX_CLI_PATH to a working native external codex.exe and restart Desktop.
    2. Confirm the workspace-routing errors disappear.
    3. Clear the user-level CODEX_CLI_PATH override with the command above.
    4. Fully restart Codex Desktop so it returns to the bundled runtime.
    5. Re-check account-only features such as Invite friends / Memory / account UI.

    This is an empirical workaround, not proof of the root cause. I cannot tell whether step 1 repaired/persisted workspace state, whether the server state refreshed during the test, or whether switching back to the bundled runtime alone restored the missing account surface. But the sequence was reproducible in this session and may save others from getting stuck on the external runtime after routing recovers.

  5. Dedicatus547 commented on Sep 24, 2026

    @Dedicatus547

    Additional independent Linux/Python SDK reproduction

    This is an independent WSL2/Linux reproduction of the account/workspace-routing initialization failure using the Python SDK.

    Environment

    • WSL2 / Linux x86_64 / glibc 2.35
    • Python 3.11
    • ChatGPT account authentication
    • openai-codex and bundled runtime: 0.154.0 vs 0.156.1

    A/B result

    The comparison used the same ChatGPT account and the same auth projection:

    Runtime initialize account/read
    0.154.0 PASS PASS
    official 0.156.1 PASS FAILED

    On 0.156.1, account/read returns InternalRpcError / JSON-RPC -32603 (UNKNOWN_INTERNAL). A safe normal-profile projection on 0.156.1 also fails account/read with the same bounded error-message hash as the isolated run.

    Official runtime provenance

    • Package: openai-codex-cli-bin==0.156.1
    • Distribution: openai_codex_cli_bin-0.156.1-py3-none-manylinux_2_17_x86_64.whl
    • Wheel SHA-256: 84a12567ca54ba6ae4ed755911c04e7cdf658315f8719963c8daa8592d8fe068
    • Bundled executable SHA-256: 0b2e9301d6100dddda3b9d5c80ebaeaa3a2f1962388f2f36f6b96a9f08b1f33f

    The package and executable hashes were verified from the official PyPI Trusted Publishing distribution.

    Isolation and interpretation

    No scenario created a thread, started a model turn, or made a provider request. Our retained Linux evidence establishes an InternalRpcError / -32603, but not a more specific internal subtype; it does not establish a routing timeout.

    An exact-source audit found that 0.156.x introduced selected-workspace routing discovery during account/read startup via accounts/check (PR #45529). This is a source-level change, not proof that this PR is the root cause.

    This independently reproduces a regression in the 0.156.1 account/workspace-routing initialization path: the same account/read boundary passes on 0.154.0 and fails on the official 0.156.1 runtime. The failure occurs before thread or model execution.

  6. ywlywl6 commented on Sep 24, 2026

    @ywlywl6

    I’m seeing a very similar issue in the VS Code Codex extension on Windows (running through WSL). account/read fails with workspace routing discovery timed out, and model/plugin requests time out around the same time. The stored auth credentials are still present, and I don’t see any refresh-token invalidation/reuse errors in the logs.

  7. marcelritzschke commented on Sep 27, 2026

    @marcelritzschke

    Seeing the same account/read workspace-routing timeout on Codex CLI 0.157.1 (Windows + WSL).

    One reproducible workaround/data point:

    codex
    # -> workspace routing discovery timed out (-32603)
    
    codex -c log_dir="$HOME/.codex/log"
    # -> starts normally

    A fresh shell makes plain codex fail again; explicitly setting log_dir makes it work again.

    Reported separately as #48600, but this looks like the same underlying workspace-routing regression.

  8. buraksahins commented on Sep 28, 2026

    @buraksahins

    the same issue!!! openai mus thave changed something on their side... all of a sudden i am completely blocked since 2 days. there seems to be not even one helpful feedback from codex/openai... today after tying many things and stubbornly repeating and repeating the same login process I could connect. but then I realized few hours later I lost the connection again...

  9. VillaHellya commented on Oct 23, 2026

    @VillaHellya

    Additional Windows CLI 0.156.1 diagnostic: non-401 discovery failure, not a timeout

    Using a pinned Windows x64 Codex CLI 0.156.1 through codex-acp 1.13.1 / Node 24.21.0:

    • 2026-10-23 17:23 UTC: a session compatibility check succeeded.
    • 2026-10-23 19:44 UTC: session/new failed before a task prompt with a generic internal error.
    • One explicitly authorized diagnostic at 19:59 UTC preserved RPC -32603 with details: workspace routing discovery failed. No session or model turn was created.
    • The declared runtime ID, ACP entry hash and package integrity were unchanged. The native executable SHA256 is 70bcb05f9bf1a4e7306edd0cd1b57d02af3267ad02a34b26f45c8c4bb20a3301. This does not establish the root cause.

    At source commit b412ff3, account_processor/workspace_routing.rs maps a non-unauthorized get_accounts_check error to DiscoveryFailed. backend-client/src/client.rs can produce that error from a non-success HTTP status, transport failure, or invalid accounts response. The RPC error loses that distinction. No underlying HTTP status or request-correlated transport/JSON diagnostic was retained in the available records.

    Could a supported diagnostic expose only a safe error category, optional HTTP status/content-type class, and an opaque request correlation ID? It must omit tokens, account IDs, URLs with parameters, raw headers and response bodies, and must not perform credential refresh or change selected-workspace routing. Merely setting account/read refreshToken=false is insufficient to guarantee this: read_account can invoke unauthorized_recovery internally.

    We are not asking to disable discovery, use a cached/fabricated route, change security policies, or switch account/runtime. This is an additional symptom, not a claim that the timeout reports above have the same cause. Please identify a supported diagnostic or corrected build if one exists.

    No raw logs, private project data, account identifiers or credentials are attached.

  10. BigWeebey commented on Oct 24, 2026

    @BigWeebey

    Hey guys.

    I had the same issue and was doing the workaround for some time.
    I just noticed that OpenSnitch must have at some point prompted me to allow ~/.codex/packages/app-server-daemon/releases/0.164.0-x86_64-unknown-linux-musl/bin/codex and it must have timed out thus blocking it.

    I just allowed it and it's back to working normally.

  11. danphnis commented on Nov 4, 2026

    @danphnis

    Workaround: codex exec restored Desktop authentication

    I encountered the same issue on Windows 11 (Desktop 26.1029.7803.0, CLI 0.166.0-alpha.6).

    The Desktop repeatedly failed with workspace routing discovery timed out, while the CLI showed Logged in using ChatGPT.

    What worked for me: Running a real model request in PowerShell:

    $codex = "$env:LOCALAPPDATA\OpenAI\Codex\bin\a159911ff70742e9\codex.exe"
    
    & $codex exec --skip-git-repo-check --sandbox read-only "你好!这是一次连接测试。请只回复:Codex 通信成功。不要读取文件或执行命令。"

    After the CLI successfully returned a response, the Desktop application recovered and my existing tasks became accessible, without logging out, clearing credentials, or reinstalling.

    The underlying mechanism remains unknown.

    Workaround discovered and tested by me. English wording assisted by ChatGPT.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    appapp-serverauthbugconnectivitymemorywindows-os

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions