Skip to content

Windows app hangs on splash when saved auth references a deactivated workspace instead of prompting re-login #19075

Open

Description

@Sasha50701

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

26.421.11020

What subscription do you have?

ChatGPT Business

What platform is your computer?

Microsoft Windows NT 10.0.26200.0 x64

What issue are you seeing?

Codex on Windows got stuck on the splash / launch screen (Codex logo in the middle, nothing else happens).

This happened after the app had previously been signed into a ChatGPT workspace that later became deactivated.

Based on the logs, an earlier launch on version 26.417.4842.0 did reach window ready-to-show and also detected that a Windows Store update was available. However, even during that launch, startup requests were already failing with:

402 Payment Required
{"detail":{"code":"deactivated_workspace"}}

After updating, later launches on 26.421.620.0 consistently got stuck on the splash screen and did not recover by prompting me to log in again or select a different workspace.

Renaming the saved auth file forced a fresh login and immediately fixed the issue:

%USERPROFILE%\.codex\auth.json -> auth.json.bak

After doing that, Codex prompted for login to a new workspace and launched normally. Existing chats/data were preserved.

What steps can reproduce the bug?

  1. Sign into Codex Desktop on Windows with an account/session associated with a ChatGPT workspace.
  2. That workspace later becomes deactivated.
  3. Launch Codex again.

Observed behavior from my case:

  • An earlier launch on 26.417.4842.0 reached window ready-to-show and detected an available Store update.
  • During that same launch, startup requests were already failing with:
    402 Payment Required
    {"detail":{"code":"deactivated_workspace"}}
  • After updating, later launches on 26.421.620.0 consistently got stuck on the splash screen and did not redirect to login/workspace selection.

Workaround:

  • Quit Codex completely.
  • Rename %USERPROFILE%\.codex\auth.json to auth.json.bak.
  • Relaunch Codex.
  • App then prompts for login and works normally again.

What is the expected behavior?

If the saved auth/session points to a deactivated workspace, Codex should not hang on the splash screen.

It should detect that the stored workspace is no longer valid and recover gracefully by:

  • prompting for login again, or
  • showing workspace selection, or
  • displaying a clear error with a recovery action.

It should not require manually renaming/deleting auth.json to recover.

Additional information

Current installed version shown in About Codex: 26.421.11020.

The failing launches I analyzed came from earlier log files, which show versions 26.417.4842.0 and 26.421.620.0. So the version in the logs is not the same as the currently installed version shown in About Codex.

Timeline from logs:

  • 2026-04-23 00:41: launch on 26.417.4842.0
    • reached window ready-to-show
    • updater reported hasUpdate=true
    • startup requests already failed with deactivated_workspace
  • 2026-04-23 01:19: launch on 26.421.620.0
    • repeated deactivated_workspace failures during app/list
    • app remained stuck on splash
  • 2026-04-23 01:37: after renaming %USERPROFILE%\.codex\auth.json, launch succeeded and app/list returned successfully

This suggests the underlying issue is stale auth/session state tied to a deactivated workspace. The update may have changed how the app behaved afterward, but based on the logs the auth/workspace failure already existed before the update.

Attached relevant logs:

Activity

  1. added
    app
    on Apr 23, 2026
  2. added
    bug
    windows-os
    auth
    on Apr 23, 2026
  3. mr-ashawa commented on Apr 23, 2026

    @mr-ashawa

    Confirm. Had the same issue (that's how I found this).
    Workaround also solved the issue.

  4. erichlukas commented on Apr 23, 2026

    @erichlukas

    Confirmed. The workaround doesn't work for me apparently.

    It worked actually. but yeah, this gotta be fixed

  5. claell commented on Apr 24, 2026

    @claell

    Can confirm that the workaround helped for me!

  6. Indominus-TAC commented on Apr 24, 2026

    @Indominus-TAC

    Can confirm that the workaround helped for me!

    This worked for me as well!

  7. yure233 commented on Apr 24, 2026

    @yure233

    same problem and same resolution

  8. aminspy commented on Apr 25, 2026

    @aminspy

    yes it has solved my problem

  9. lelandg commented on Apr 26, 2026

    @lelandg

    Deleting the auth.json did not solve my problem. But deleting the %USERPROFILE%\.codex\ and reinstalling worked.

  10. AbubakarMahmood commented on Apr 28, 2026

    @AbubakarMahmood

    I hit the same Windows splash deadlock. I cannot create a deactivated workspace for a clean repro, but the public app-
    server code seems consistent with the reported state loop.

    The startup/auth check appears to trust cached auth first:

    • AppServerSession::read_account() sends account/read with refresh_token: false
    • get_login_status() treats Some(Account::Chatgpt { .. }) as authenticated
    • should_show_login_screen() only shows login for LoginStatus::NotAuthenticated
    • backend get_account_response() builds account state from cached auth via provider.account_state()

    Relevant lines:

    • codex-rs/tui/src/app_server_session.rs:302
    • codex-rs/tui/src/lib.rs:1686
    • codex-rs/tui/src/lib.rs:1749
    • codex-rs/app-server/src/codex_message_processor.rs:1884
    • codex-rs/model-provider/src/provider.rs:147

    Then app/list performs the real workspace/app backend calls. A non-success ChatGPT backend response is converted
    into a generic error string, and the app/list path returns that as an internal JSON-RPC error rather than converting
    invalid workspace/auth into logout or NotAuthenticated.

    Relevant lines:

    • codex-rs/app-server/src/codex_message_processor.rs:5843
    • codex-rs/app-server/src/codex_message_processor.rs:5938
    • codex-rs/app-server/src/codex_message_processor.rs:6012
    • codex-rs/chatgpt/src/connectors.rs:100
    • codex-rs/chatgpt/src/chatgpt_client.rs:63

    I also do not see any explicit handling for deactivated_workspace in the repo. The only clear auth-clearing path is
    explicit logout:

    • codex-rs/tui/src/app_server_session.rs:728
    • codex-rs/app-server/src/codex_message_processor.rs:1756
    • codex-rs/login/src/auth/manager.rs:1730

    So I think this is best described as an invalid-auth/workspace state transition bug, not a true module circular
    dependency (Correction to my earlier framing). Cached auth is enough to pass startup/login gating, but later workspace-backed startup calls fail. That failure does not clear auth or expose a recovery action, so the desktop shell can remain stuck in splash/loading until auth.json is removed or codex logout is run.

    Suggested fix direction, not a full patch: when a startup request receives a permanent workspace/auth rejection like
    deactivated_workspace, classify it as “saved auth is no longer usable”, clear or invalidate the cached auth state,
    emit/update account state as unauthenticated, and route to login/workspace selection. A manual “logout/reset auth”
    action on the splash screen would also be a good fallback, but the primary fix should probably be to break the stale-
    auth state immediately rather than retrying it.

    A retry/circuit-breaker limit would still be useful as a defensive guard against future splash loops, but for this
    specific error retrying seems unnecessary because the workspace rejection is permanent until the user chooses a
    different workspace/session/log-in method.

    flowchart TD
        A[App starts] --> B[account/read]
        B --> C{Cached auth exists?}
        C -->|No| D[Show login/onboarding]
        C -->|Yes| E[Treat as authenticated]
    
        E --> F[Main UI / app boot continues]
        F --> G[app/list]
        G --> H[Load connector directory + codex_apps MCP]
        H --> I[ChatGPT backend rejects token/workspace]
        I --> J[402 deactivated_workspace returned as generic app/list error]
    
        J --> K[Desktop shell keeps splash/loading state]
        K --> L{Was auth cleared?}
        L -->|No| B
        L -->|Manual logout / codex logout| D
    
        style J fill:#ffd6d6,stroke:#c00
        style L fill:#ffd6d6,stroke:#c00
    
    Loading
  11. Waad82J commented on Apr 29, 2026

    @Waad82J

    I can confirm I’m seeing this same failure mode.

    In my case, the workspace was expired/deactivated. ChatGPT appears to have fixed this flow now by letting the user switch to/join a personal workspace instead of getting stuck, but Codex still opens to a blank/unusable screen with no in-app way to log out or switch workspace.

    The workaround was to manually log out through the local Codex files, then reopen Codex. After that, the app became usable again.

    The main requested fix is the same as this issue: when Codex detects deactivated_workspace / stale workspace auth state, it should show a recovery UI with “switch workspace” or “log out / sign in again” instead of rendering a blank screen.

  12. TVpoet commented on May 21, 2026

    @TVpoet

    Holy crap, this is exactly the same issue I ran into! I fixed the same problem using your method.

  13. DavidDah commented on Sep 10, 2026

    @DavidDah

    Regression confirmation from a current Windows Store build, with a different visible symptom but the same underlying failure.

    Environment

    • ChatGPT/Codex Windows Store package: OpenAI.Codex_26.903.8094.0_x64__2p2nqsd0c76g0
    • Windows 11 Enterprise 25H2, build 26200
    • x64
    • GPU: NVIDIA GeForce RTX 4060 Laptop GPU
    • NVIDIA driver: 32.0.15.9191 (591.91)

    User-visible symptom

    Instead of remaining stuck on the splash screen, the app launched and rendered the normal ChatGPT UI, but then continuously flickered: the sidebar, input area, and main content repeatedly disappeared and reappeared while the native window frame remained present. The app process itself stayed alive.

    Log evidence

    The desktop log shows the local app/server starting normally:

    • stdio_transport_spawned
    • initialize_handshake_result ... outcome=success
    • Codex CLI initialized
    • window main frame finished load
    • window ready-to-show

    Immediately afterward, ChatGPT account/bootstrap requests began failing with HTTP 402 and errorCode=deactivated_workspace / Payment Required.

    The initial account lookup reported:

    • accountsHttpStatus=402
    • authenticatedAccountPresent=false
    • failureType=accounts_request_failed
    • result=failed

    During the ~4m45s captured log, there were:

    • 1,043 sa_server_request_failed lines containing both status=402 and deactivated_workspace
    • 81 chatgpt_conversation_updates_subscription_mounted events
    • 80 corresponding ..._unmounted events
    • 0 render-process-gone
    • 0 did-fail-load
    • 0 GPU/renderer crash markers searched (gpu-process-crashed, renderer-process-crashed)

    The repeated mount/unmount cycle closely matched the full-window UI disappearance/reappearance seen on screen.

    Workaround that fixed it immediately

    With the app fully quit, the following persisted auth files were moved out of use:

    • %USERPROFILE%\.codex\auth.json
    • %USERPROFILE%\.codex\cap_sid

    On next launch the app required fresh authentication. After signing in again, the flickering stopped and the app operated normally.

    A Microsoft Store app Repair/Reset alone is therefore not a complete recovery path if these %USERPROFILE%\.codex\ credentials remain stale.

    Why this seems important

    This confirms that the stale/deactivated-workspace auth bug is still reproducible in 26.903.8094.0, months after the versions originally reported here. It can now present not only as a stuck splash screen but also as a severe full-window render/re-mount loop that looks like a GPU/compositor bug.

    This may also explain at least some visually similar Windows 11 build 26200 flicker reports such as #39846 / #34351 / #34299. Before attributing those solely to graphics, it may be worth checking whether their logs contain the same repeated 402 deactivated_workspace failures.

    Expected client behavior

    When account/bootstrap requests return 402 deactivated_workspace, the desktop client should invalidate the stale workspace/session state and present a recoverable UI such as Sign in again / Switch account / Retry, rather than continuing to mount/unmount the ChatGPT UI indefinitely.

    Raw logs were not attached here because they contain account/session-identifying fields. They can be sanitized before sharing if maintainers need them.

  14. Jedert-ShadowWorld commented on Sep 26, 2026

    @Jedert-ShadowWorld

    I can confirm a very similar failure on a current Windows Codex/Work build.

    Environment:

    • Windows 11, build 26200
    • Codex package version: 26.924.1866.0
    • Runtime bundle selected: 26.905.11957
    • ChatGPT Plus

    Symptoms:

    • Codex/Work opened to the splash screen and spun indefinitely.
    • The backend/app-server itself appeared healthy: app-server handshake completed, account lookup succeeded, and API requests including task/list returned HTTP 200.
    • No sign-in screen was shown.
    • Repairing the Windows app did not help.
    • Resetting the OpenAI.Codex MSIX package did not help either; after the reset it still went directly to the infinite spinner without asking me to sign in.
    • Recreating the Electron/Chromium web profile under the package LocalCache also did not help.

    What fixed it:

    1. Quit Codex completely.
    2. Stop the remaining codex-windows-sandbox-service process.
    3. Rename:
      %USERPROFILE%\.codex\auth.json
      to:
      auth.json.bak
    4. Start Codex again.
    5. The login screen immediately appeared.
    6. After signing in again, Codex/Work launched normally.

    So in this case Windows Repair/Reset was insufficient because the problematic authentication state survived outside the MSIX package under %USERPROFILE%\.codex\auth.json.

    One difference from the original report: I did not establish that the workspace was deactivated. The visible behavior was simply a permanent splash spinner with an apparently valid/working backend session. Forcing regeneration of auth.json resolved it immediately.

    This suggests the app should probably recover from stale/corrupt/inconsistent saved auth state by invalidating it and prompting for login instead of remaining indefinitely on the splash screen.

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

    appauthbugperformancewindows-os

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions