Skip to content

Unavailable — Codex Desktop cannot load account data, so no active Codex session is available for /feedback. #48571

Open

Description

@TealtKoder

Codex Desktop: 26.924.2738.0
Codex CLI: 0.158.0-alpha.2.1
Windows native

Desktop error:
failed to read app metadata: ChatGPT account ID not available, please re-run codex login

Normal OAuth: succeeds
Device-auth: succeeds
OAuth token exchange: succeeds

auth_json_account_id: MISSING
jwt_chatgpt_account_id: MISSING
jwt_chatgpt_user_id: MISSING
jwt_chatgpt_plan_type: MISSING
jwt_user_id: PRESENT
jwt_organizations: 1

codex doctor:
auth configured
state databases healthy
WebSocket connected (HTTP 101)
OpenAI endpoints reachable

Activity

  1. added
    bug
    app
    windows-os
    auth
    on Sep 26, 2026
  2. github-actions commented on Sep 26, 2026

    @github-actions
    Contributor

    Potential duplicates detected. Please review them and close your issue if it is a duplicate.

    Powered by Codex Action

  3. TealtKoder commented on Sep 27, 2026

    @TealtKoder
    Author

    My case appears related to this issue, but the Desktop UI does open.

    Instead, Codex Desktop shows:
    “Failed to load your data”

    The Desktop log contains:
    failed to read app metadata: ChatGPT account ID not available, please re-run codex login

    I reproduced the missing account ID after BOTH:

    • normal codex login
    • codex login --device-auth

    Both result in:

    • auth_json_account_id: MISSING
    • jwt_chatgpt_account_id: MISSING
    • jwt_chatgpt_user_id: MISSING
    • jwt_chatgpt_plan_type: MISSING
    • jwt_user_id: PRESENT

    OAuth itself succeeds:
    oauth token exchange succeeded

    codex doctor reports healthy auth, healthy databases, WebSocket HTTP 101, and reachable OpenAI endpoints.

    So the Desktop UI works, but account/workspace metadata cannot be loaded because the ChatGPT account ID is missing from the resulting credentials.

    Could this be the same underlying Windows/ChatGPT account identity issue as #47783?

  4. SuperWBY commented on Oct 8, 2026

    @SuperWBY

    Additional data point: same symptom on macOS with the latest build — and this account used to receive chatgpt_account_id

    Environment

    • ChatGPT/Codex Desktop 26.1002.52244 (this is the newest build per the official appcast), macOS 15.7.3, Apple Silicon
    • Bundled app-server: codex-cli 0.162.0-alpha.2
    • codex doctor reports auth is configured, stored ChatGPT tokens: true, and the desktop app-server initialized successfully
    • The Codex CLI works normally on the same machine, same account, same network

    Symptom
    Every account-scoped request fails with a locally generated Error("Workspace routing is unavailable", 432) — /settings/user, /wham/usage, /wham/statsig/bootstrap, /wham/onboarding/context.

    Decoding ~/.codex/auth.json before and after a full sign-out + fresh sign-in

    before after fresh login
    tokens.account_id 9e2cbe77-… None
    access_token["https://api.openai.com/auth"] keys amr, chatgpt_compute_residency, chatgpt_data_residency, poid, user_id identical
    chatgpt_account_id MISSING MISSING

    id_token carries only organizations: [{id: "org-…", is_default: true, role: "owner", title: "Personal"}] — no chatgpt_account_id, and no chatgpt_user_id either.

    So this account previously did receive chatgpt_account_id (the CLI persisted it into tokens.account_id), and no longer does after re-authentication. A fresh login does not restore it — consistent with the report above.

    What the bundled app-server actually returns (captured over stdio JSON-RPC)

    "account": {"type": "chatgpt", "email": "<redacted>", "planType": "unknown"},
    "workspaceRouting": null

    Note it is null, not absent. That field is driven by auth.json.tokens.account_id: when that value was populated, the app-server returned a complete object with chatgptAccountId, backendOrigin, and accountRoutingOverride. So the app-server side is not the problem.

    Where it breaks (from app.asar)

    // Ak.get()
    if (r.kind === 'workspace' && r.workspace.chatgptAccountId !== yo(token)?.accountId)
      throw Error('Workspace routing does not match the authenticated account');
    
    // yo(token) reads the JWT claim only
    return { accountId: claims['https://api.openai.com/auth'].chatgpt_account_id };

    With no chatgpt_account_id in the JWT, yo(token)?.accountId is undefined, the comparison can never match, and the caller wraps the non-abort error into the 432 seen on every request:

    catch (e) {
      throw e instanceof Error && e.name === 'AbortError'
        ? e
        : new my('Workspace routing is unavailable', 432, e)
    }

    One extra detail that may matter: because workspaceRouting comes back as null (not undefined), the kind: 'legacy' fallback in discover() is skipped too — it only applies when workspaceRouting === undefined and the app-server version is within [0.141.0, 0.155.0-alpha.5).

    Ruled out on this machine

    • CODEX_CLI_PATH — unset (launchctl, shell env, and shell profiles all clean)
    • Proxy/VPN — the CLI works on the identical network path
    • Token expiry — access token valid for 10 days
    • Account mismatch — auth.json account id and the app-server's workspaceRouting.chatgptAccountId matched exactly when both were present
    • App version — already the latest
    • Config requirements — configRequirements/read returns {"requirements": null}
    • Runtime residue — removing the downloaded app-server-daemon releases changed nothing

    Practical consequence: the only local workaround found is forcing the app-server into the legacy branch by pointing CODEX_CLI_PATH at an older binary (0.154.0), which makes the account UI load again but drops usage/quota/credits features — presumably because the legacy path has no workspace route at all.

  5. Ekko82 commented on Oct 27, 2026

    @Ekko82

    We recovered one Windows installation with the same missing-claim pattern on Codex Desktop 26.1021.3705.0 (2026-10-27). ChatGPT in the browser and the CLI could respond, but the desktop could not load the account. Reauthorization through the existing browser session still produced credentials without chatgpt_account_id, chatgpt_user_id, and chatgpt_plan_type.

    What worked in this case was official device-code authorization in a fresh Edge InPrivate session, using the same account:

    1. Save work and fully quit the desktop app.
    2. Enable device-code login in ChatGPT's web security settings; managed workspaces may require administrator permission.
    3. Close all existing Edge InPrivate windows after saving their contents, then open a new one.
    4. Run codex login --device-auth under the same Windows user. Keep the terminal open and use the newly generated code.
    5. Open the official URL printed by the terminal in that fresh InPrivate window, sign in to the intended account, and authorize the code.
    6. Wait for the terminal to report Successfully logged in, then reopen the desktop and test a message. Fully quit and reopen again to check that the login persists.

    The newly issued credentials contained the missing fields. The desktop then loaded the account, returned a reply, and remained signed in after a full exit and reopen. No desktop binaries, JWT contents, or .env files were modified.

    For precision: our diagnostic run first validated the new credentials in an isolated CODEX_HOME, then used those official credentials in the desktop's normal store. The checklist above adapts that method for a setup where the CLI and desktop share the login store; custom homes, credential stores, or managed login policies need separate checking.

    This is one observed recovery, not confirmation of the underlying cause or a fix for every login failure. In particular, it does not prove that browser cookies explain all missing-claim cases.

    We documented the steps, scope, and validation here: Windows desktop login recovery guide (English; Chinese version linked). The device-code command and credential storage options are covered in the official authentication documentation.

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

    appauthbugwindows-os

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions