Skip to content

Codex fails with "duplicate workspace in routing discovery" after successful ChatGPT login on Windows #47034

Open

Description

@MattSoares

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

0.155.0-alpha.9.2

What subscription do you have?

ChatGPT Plus

What platform is your computer?

Microsoft Windows NT 10.0.26200.0 x64

What issue are you seeing?

The Codex desktop app on Windows is unable to complete the account initialization/sign-in process.

The Codex CLI is installed correctly and authentication succeeds:

codex login status
Logged in using ChatGPT

However, when starting Codex, it fails during TUI bootstrap with:

Error: account/read failed during TUI bootstrap: account/read failed: duplicate workspace in routing discovery (code -32603)

I have already reinstalled Codex and verified that the runtime files referenced by config.toml exist.

I also performed a complete logout and login. Authentication completed successfully, but the exact same duplicate workspace in routing discovery error occurred immediately afterward.

What steps can reproduce the bug?

  1. Install/reinstall the Codex desktop app on Windows.
  2. Open PowerShell.
  3. Run:
codex login status

Authentication is reported as successful:

Logged in using ChatGPT
  1. Run:
codex logout

Result:

Successfully logged out
  1. Run:
codex login

Complete authentication in the browser.

Result:

Successfully logged in
  1. Start Codex:
codex
  1. Codex begins loading but immediately fails with:
Error: account/read failed during TUI bootstrap: account/read failed: duplicate workspace in routing discovery (code -32603)

The issue persists after reinstalling the application and performing a fresh authentication.

What is the expected behavior?

After successfully authenticating with my ChatGPT account, Codex should complete the account/workspace discovery process and start normally instead of failing during account/read.

Additional information

Codex CLI version observed during testing:

OpenAI Codex v0.155.0-alpha.9.2

I verified that the runtime paths referenced by the generated config.toml exist on disk.

The problem persists after:

  • Reinstalling Codex
  • Logging out completely
  • Authenticating again successfully
  • Verifying that codex login status reports Logged in using ChatGPT

The error specifically occurs during account/workspace discovery:

duplicate workspace in routing discovery (code -32603)

This may be related to the workspace/account routing process rather than local authentication, since authentication itself completes successfully.

Activity

  1. added
    app
    on Sep 21, 2026
  2. added
    bug
    CLI
    windows-os
    auth
    app-server
    on Sep 21, 2026
  3. KongFxi commented on Sep 21, 2026

    @KongFxi

    I have also encountered such a situation.

  4. kherona commented on Sep 23, 2026

    @kherona

    I have this problem too, somehow I have multiple workspaces when I try to login and cant see them or do anything about them, right now I cannot use codex on this account..

    Image
  5. huangziwei01 commented on Sep 23, 2026

    @huangziwei01

    I’m seeing the same issue on macOS with Codex CLI v0.156.1 and a ChatGPT Plus account that has multiple workspaces.

    The error is:

    Error: account/read failed during TUI bootstrap:
    account/read failed: duplicate workspace in routing discovery (code -32603)

    Authentication itself succeeds:

    Successfully logged in
    Logged in using ChatGPT

    I’ve now reproduced the same failure through multiple independent login/configuration paths:

    Normal OAuth login -> duplicate workspace in routing discovery
    Fresh CODEX_HOME -> duplicate workspace in routing discovery
    forced workspace ID -> duplicate workspace in routing discovery
    device-auth login -> duplicate workspace in routing discovery

    For the isolated test I used a completely fresh CODEX_HOME, so existing Codex state and account-switching tools were not involved.

    I also tested:

    forced_chatgpt_workspace_id = ""

    and confirmed that the OAuth authorization request included:

    allowed_workspace_id=

    Authentication still succeeded, but account/read failed with the same duplicate workspace error.

    I also tested:

    codex login --device-auth

    and the result was still the same duplicate workspace in routing discovery failure.

    One additional data point: another ChatGPT account on the same Mac, with only one workspace, works normally in Codex. The affected account has multiple workspaces.

    This makes it look increasingly likely that the failure is in workspace routing/discovery after successful authentication, rather than in the local credential store or a specific login method.

    I’ve also opened an OpenAI Support case and they’ve requested codex login status, codex doctor, codex-login.log, a debug TUI log, and the workspace IDs for further investigation.

  6. Koninec commented on Sep 23, 2026

    @Koninec

    Reproduced on Codex CLI 0.156.1 on Windows x86_64.

    codex --version
    codex-cli 0.156.1
    
    codex login status
    Logged in using ChatGPT
    

    --no-daemon does not change the result:

    codex --no-daemon
    
    Error: account/read failed during TUI bootstrap:
    account/read failed: duplicate workspace in routing discovery (code -32603)
    

    codex doctor --summary reports:

    ✓ runtime      standalone (windows, ...)
    ✓ install      consistent
    ✓ config       loaded
    ✓ auth         auth is configured
    ✓ network      no proxy env vars
    ✓ websocket    connected (HTTP 101 Switching Protocols)
    ✓ reachability active provider endpoints are reachable over HTTP
    
    Background Server
    ○ app-server   not running (ephemeral mode)
    

    The same error also occurs with codex exec:

    codex exec "Reply exactly with: CODEX_OK"
    

    Output:

    ERROR: Reconnecting... 2/5
    ERROR: Reconnecting... 3/5
    ERROR: Reconnecting... 4/5
    ERROR: Reconnecting... 5/5
    warning: Falling back from WebSockets to HTTPS transport. duplicate workspace in routing discovery
    ERROR: Reconnecting... 1/5
    ERROR: Reconnecting... 2/5
    ERROR: Reconnecting... 3/5
    ERROR: Reconnecting... 4/5
    ERROR: Reconnecting... 5/5
    ERROR: duplicate workspace in routing discovery
    ERROR: duplicate workspace in routing discovery
    

    Login succeeds and doctor reports auth/connectivity as healthy.

  7. MattSoares commented on Sep 23, 2026

    @MattSoares
    Author

    Hello,

    I’m still unable to use Codex because of the duplicate workspace in routing discovery issue. I have checked my ChatGPT account and it shows only one account and one personal workspace, but Codex displays the same workspace twice and fails to start the session.

    I’ve already checked that I’m using the latest version, but I still haven’t found a solution to this issue. I’m honestly very disappointed with this situation, especially because I’m paying for the service but currently cannot use one of its features properly.

    I understand that bugs can happen, but I would really appreciate a clear solution or at least an update on when this issue is expected to be fixed.

    Thank you, and I hope this can be resolved as soon as possible.

  8. Koninec commented on Sep 23, 2026

    @Koninec

    Hello,

    I’m still unable to use Codex because of the duplicate workspace in routing discovery issue. I have checked my ChatGPT account and it shows only one account and one personal workspace, but Codex displays the same workspace twice and fails to start the session.

    I’ve already checked that I’m using the latest version, but I still haven’t found a solution to this issue. I’m honestly very disappointed with this situation, especially because I’m paying for the service but currently cannot use one of its features properly.

    I understand that bugs can happen, but I would really appreciate a clear solution or at least an update on when this issue is expected to be fixed.

    Thank you, and I hope this can be resolved as soon as possible.

    As a temporary workaround, you can downgrade to 0.154.0. This is not an official fix, but it worked in my case.

    Windows 11 (PowerShell):

    $env:CODEX_RELEASE='0.154.0'; irm https://chatgpt.com/codex/install.ps1 | iex

    Linux:

    curl -fsSL https://chatgpt.com/codex/install.sh | sh -s -- --release 0.154.0

    Then verify with:

    codex --version

    Edit: this works for the CLI version of Codex, I haven´t tried fixing the GUI version

  9. J-Amano commented on Sep 30, 2026

    @J-Amano

    Additional reproduction on Windows (Codex Desktop 26.924.2738.0; external codex-cli 0.159.0).

    In my environment:

    • Direct CLI execution succeeds with an isolated CODEX_HOME/TMP/TEMP, --no-daemon, all CODEX_* variables removed, and no CODEX_APP_TOOLS_PIPE_PATH. A minimal prompt returns OK.
    • The same CLI invoked through a semantic executor fails before the prompt with codex_apps MCP initialization / workspace routing discovery failed.
    • The local project MCP and repository permissions are healthy; the failure occurs before any implementation-session mutation.
    • PowerShell/curl can also show Windows Schannel SEC_E_NO_CREDENTIALS, although the direct isolated CLI smoke test can succeed.

    This looks like a Codex app-server/workspace-routing or Windows transport/sandbox interaction rather than an auth.json or repository-permission problem. The strongest differential is the execution context: clean standalone CLI succeeds, Desktop-inherited semantic execution fails. No credentials, tokens, private logs, or account identifiers are included here.

  10. mallejsan-pixel commented on Oct 3, 2026

    @mallejsan-pixel

    I am experiencing the same issue on Windows with Codex CLI 0.160.0, and I have additional evidence that may help identify the root cause.

    Most importantly, my ChatGPT account visibly shows TWO identical Personal workspaces for the same account/email address. In the ChatGPT mobile app, both entries are displayed as “Personal account / Personal”.

    This appears to correlate directly with the Codex error:

    Error: account/read failed during TUI bootstrap: account/read failed: duplicate workspace in routing discovery (code -32603)

    Environment:

    • Windows 11 Professional 64-bit
    • Codex CLI: 0.160.0
    • Installed via npm
    • Authentication: ChatGPT

    Authentication itself succeeds:

    • codex login status returns: Logged in using ChatGPT
    • Fresh codex login completes successfully
    • codex-login.log shows a valid callback and successful OAuth token exchange
    • WebSocket connection succeeds (HTTP 101)
    • ChatGPT endpoints are reachable

    I also performed a complete clean authentication reset:

    • Logged out of all ChatGPT sessions
    • Ran codex logout
    • Renamed/removed the previous ~/.codex/auth.json
    • Performed a completely fresh codex login
    • Login returned Successfully logged in
    • Immediately ran codex

    The same duplicate workspace in routing discovery (code -32603) error still occurs.

    codex doctor completes with:

    • 22 OK
    • 4 notes
    • 3 warnings
    • 0 failures
    • Local databases healthy
    • No duplicate local rollout thread IDs or DB paths detected
    • Background app-server running

    Failing run: October 3, 2026, approximately 07:54 AM (UTC+3).

    The important additional finding is that the ChatGPT UI itself displays two identical Personal workspaces. This suggests there may be a duplicate/stale Personal workspace association in the account/backend routing data rather than a local CLI authentication problem.

    I can provide the redacted codex-login.log and additional diagnostics if needed.

    Image Image Image Image Image Image Image Image
  11. Sanchit-Koul commented on Oct 4, 2026

    @Sanchit-Koul

    Encountering the same issue. Unable to login into codex cli or chat gpt windows app. Downgrading to 0.154.0 doesn't help either. I have raised a ticket but still awaiting any official workaround/fix. Here's my replication steps:

    Problem:
    When signing into ChatGPT/Codex, the workspace selector shows TWO identical entries, both named "Personal account". I did not create a second workspace.

    ChatGPT Web:

    • Login succeeds after selecting either of the two "Personal account" entries.
    • The duplicate workspace has been present for some time.
    • The issue occurs across multiple browsers.

    Affected clients:

    • Codex CLI: FAILS
    • ChatGPT Windows app: FAILS
    • VS Code Codex extension: WORKS

    Exact Codex error:
    "account/read failed during TUI bootstrap: account/read failed: duplicate workspace in routing discovery (code -32603)"

    Environment:

    • Windows
    • Codex CLI 0.160.0
    • Installed via npm
    • codex executable:
      C:\Program Files\nodejs\codex
      C:\Program Files\nodejs\codex.cmd

    I have already tried:

    • codex logout
    • codex login --device-auth
    • Successful device authentication
    • Starting Codex again after successful authentication
    • Testing across multiple browsers
    • Updating/reinstalling/testing the client

    Important detail:
    codex login --device-auth reports "Successfully logged in", but immediately afterward codex fails with the duplicate workspace routing error.

    There is no CODEX_CLI_PATH environment variable configured.

    The failure therefore appears to occur during account/workspace routing discovery rather than authentication itself.

    If anyone has a workaround, please do share!

  12. huawarrenm0-hash commented on Oct 21, 2026

    @huawarrenm0-hash

    I want to know if you encountered this problem when you turned on a network proxy, especially in TUN mode. I ran into the same issue, and the timing was exactly after turning on TUN.I also tried submitting a ticket, but unfortunately OpenAI hasn’t replied to me for three weeks.

  13. kherr-mediafly commented on Nov 1, 2026

    @kherr-mediafly

    Same on macOS 26.7 arm64, ChatGPT Pro Lite, and still broken in 0.166.0. 0.154.0 works with the same auth.json, in both the TUI and codex exec.

    The ID token's organizations claim lists two orgs I own, both titled "Personal"; only one appears in the platform.openai.com UI. Renaming the visible one (the new title shows in the refreshed token) doesn't help, and neither does forced_chatgpt_workspace_id set to my workspace UUID. OpenAI Support confirmed the hidden org can't be removed self-serve.

  14. Indayo commented on Nov 10, 2026

    @Indayo

    Still reproducible on macOS as of Nov 10, 2026, now in the ChatGPT desktop app.

    • macOS 27.2.1, Apple Silicon
    • ChatGPT desktop app 26.1103.60933 (bundled codex 0.167.0-alpha.3.2): browser sign-in completes, then account/read fails with duplicate workspace in routing discovery, and the UI logs Workspace routing is unavailable.
    • Standalone codex-cli 0.155.1 (npm) works with the same auth.json: it has no workspace routing discovery.
    • Tried launching the desktop app with CODEX_CLI_PATH pointing to codex 0.155.1. It doesn't help: the app hangs at startup with Desktop startup policy read failed ... reason=protocol. So right now there's no way to use the desktop app with ChatGPT sign-in on an affected account.
    • OpenAI Support confirmed on Oct 3 that /backend-api/wham/accounts/check returns the same personal account ID twice, and that they can't remove the duplicate from their side.

    Suggestion: read_account in codex-rs/app-server/src/request_processors/account_processor/workspace_routing.rs returns DuplicateWorkspace whenever the account ID matches more than one entry. If the duplicate entries agree on workspace_backend_origin and account_routing_override, the client could use the first one instead of failing. That would unblock everyone here while the backend data gets fixed.

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

    CLIappapp-serverauthbugwindows-os

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions