Skip to content

Windows Codex Desktop: second message hangs indefinitely while first message works #47855

Open

Description

@clevertonelielpsn-hue

Description

Codex Desktop on Windows consistently hangs when sending the second message in a conversation.

The first message completes successfully, but the second message remains indefinitely in the loading/running state and never reaches the Codex app-server.

The issue occurs both inside projects and in a new conversation outside any project.

Environment

  • OS: Windows
  • Codex Desktop package: 26.917.8451.0
  • Codex CLI bundled with Desktop: 0.155.0-alpha.16.3
  • CLI model during testing: gpt-6-luna
  • Desktop installed from Microsoft Store

Steps to reproduce

  1. Open Codex Desktop.

  2. Start a new conversation.

  3. Send:

    Respond only: test 1

  4. The response completes normally.

  5. Send:

    Respond only: test 2

  6. The UI remains indefinitely in the running/loading state.

The operation cannot be interrupted normally from the UI.

Expected behavior

The second message should start a new turn and complete normally.

Actual behavior

The first turn completes successfully.

The second message remains indefinitely in the loading state.

Important diagnostic findings

I tested the bundled Codex CLI separately using the same machine/account.

Multiple turns work normally in the same CLI session:

  • test 1 -> success
  • test 2 -> success

This suggests the account, backend and Codex runtime itself are working.

I also inspected the local app-server logs while reproducing the Desktop issue.

For the hanging second message:

  • no new turn/start is recorded
  • no TurnInput is recorded
  • no thread/resume is recorded
  • the persistent queue contains no queued item for the second message
  • the app-server remains alive and responds to other requests

This suggests that the second message is getting stuck before it reaches the app-server.

Electron / IPC observations

I launched the Desktop application with Chromium/Electron stderr logging enabled.

After the first successful turn, the logs contain messages such as:

Received broadcast but no handler is configured method=client-status-changed

Received broadcast but no handler is configured method=thread-stream-following-status-requested

Received broadcast but no handler is configured method=thread-stream-following-changed

There are also messages such as:

Received turn/started for unknown conversation

and later:

Received turn/completed for unknown conversation

Another warning observed:

MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 destroyed listeners added to [WebContents]. MaxListeners is 10.

After attempting to send the second message, no corresponding new turn submission appears in the Electron/app-server logs.

Additional observation

The Desktop starts the bundled Codex app-server with:

-c features.code_mode_host=true app-server --analytics-default-enabled -c [email protected]_servers.codex_app.enabled=true

I also previously observed:

failed to load configuration: invalid transport in mcp_servers.codex_app

when launching ChatGPT.exe directly without the normal packaged startup flow.

I do not know whether this is related to the second-turn issue, but I am including it as diagnostic information.

Troubleshooting already performed

The following did NOT resolve the issue:

  • Windows app Repair
  • Windows app Reset
  • complete uninstall/reinstall
  • removing/recreating the Codex Chromium profile
  • testing outside WSL projects
  • testing in a completely new conversation
  • disabling Memories
  • removing followUpQueueMode
  • disabling the notify hook
  • checking the persistent queue
  • recreating thread writer locks

The issue still reproduces consistently.

The Codex CLI continues to support multiple turns normally.

Summary

The failure appears to occur in the Windows Desktop frontend / Electron / IPC conversation-submission path after the first completed turn, before the second request reaches the local Codex app-server.

Activity

  1. added
    bug
    app
    windows-os
    app-server
    on Sep 24, 2026
  2. LGToo commented on Sep 25, 2026

    @LGToo

    Additional reproduction / workaround from another Windows user:

    • Symptom matched this issue exactly: first message in a new Codex Desktop chat works, second message hangs indefinitely.
    • Repair/reset/reinstall only helped temporarily; the problem returned.
    • Codex Configuration UI showed unrecognized/deprecated settings, including:
      • computer_use.windows.always_allowed_app_ids from %USERPROFILE%\.codex\config.toml
      • features.thread_tools in session flags
    • Important: before changing the config file, ChatGPT/Codex was fully closed, including terminating any remaining ChatGPT/Codex processes in Windows Task Manager.
    • After that, %USERPROFILE%\.codex\config.toml was renamed to config.toml.backup and Codex was restarted.
    • This immediately restored normal multi-turn chat behavior.

    This suggests stale/unsupported user config may be able to trigger or preserve the second-turn hang on Windows. Reinstalling the app may not clear %USERPROFILE%\.codex\config.toml, and fully terminating the desktop processes before renaming the file may be important if config/session state is kept in memory.

  3. chopper10elf-lan commented on Sep 25, 2026

    @chopper10elf-lan

    I can also confirm this issue on Codex Desktop for Windows.

    My symptom is very similar: the first message in a conversation can complete normally, but a follow-up / second message can become stuck in the Desktop frontend and fail to proceed normally.

    An important comparison in my environment is that VS Code Codex and the standalone Codex CLI on the same Windows machine can continue working across multiple turns. This makes the problem appear specific to Codex Desktop rather than a general account, network, or model availability failure.

    I have actually been experiencing Windows Codex Desktop reliability problems since around the GPT-6 Astra rollout period, including model visibility inconsistencies. I did not submit bug reports when those problems first appeared, so I cannot provide an older GitHub issue from my account, but the second-turn/frontend-stall behavior is not something I first encountered only after the most recent Desktop releases.

    Observed pattern:

    • Windows Codex Desktop
    • First turn can complete normally
    • Second/follow-up message can hang in the frontend
    • Same ChatGPT account works normally for multi-turn sessions in VS Code Codex / standalone Codex CLI
    • The problem has persisted intermittently across the broader period since the Astra rollout
    • I did not report it when I first encountered it

    Because CLI / VS Code Codex continue to work on the same machine and account, this seems consistent with a Desktop-specific frontend, thread/session state, IPC, or app-server synchronization issue.

    I hope this additional long-running reproduction history is useful for determining whether the recent reports are a regression of an older Windows Desktop issue rather than an entirely new bug.

  4. arasht52 commented on Sep 25, 2026

    @arasht52

    Additional reproduction detail that may help isolate the Windows Desktop issue:

    On my Windows installation, the problem reliably returns after either:

    • restarting Windows, or
    • fully closing and reopening Codex Desktop.

    After startup, the first message works, but the second/follow-up message gets stuck before a new turn/start is created.

    However, a full Sign out → Sign back in immediately restores normal multi-turn behavior. It continues working until the app is restarted (or Windows is restarted), at which point the same failure returns and another sign-out/sign-in fixes it again.

    So in my case the workaround is reproducible:

    1. Start/restart Codex Desktop → first turn works, second turn stalls.
    2. Sign out of the account.
    3. Sign back in to the same account.
    4. Multi-turn conversations work normally.
    5. Restart Codex Desktop/Windows → bug returns.

    This recurrence pattern may point to authentication/session state being restored incorrectly during Desktop startup rather than the conversation itself being corrupted.

  5. arasht52 commented on Sep 26, 2026

    @arasht52

    Additional diagnostic / workaround result from the affected Windows machine:

    The failure evolved today into Codex Desktop getting stuck indefinitely on the startup spinner. Windows App Repair did not help, and terminating/restarting the app did not help.

    I then tested authentication-state resets in two stages:

    1. With Codex fully quit, I renamed only %USERPROFILE%\.codex\auth.json, relaunched, and completed a fresh browser sign-in. The sign-in succeeded, but Codex returned to the indefinite startup spinner. So resetting auth.json alone was NOT sufficient.

    2. I quit Codex again, renamed the newly generated auth.json and also renamed %USERPROFILE%\.codex\cap_sid, then relaunched and completed a fresh sign-in. This time Codex loaded normally.

    After the combined auth.json + cap_sid reset:

    • Desktop loaded successfully.
    • Multiple consecutive messages in the same conversation completed successfully (not just the first turn).
    • I then closed Codex normally with the window close button, waited, reopened it without signing out or modifying any files, and multi-turn remained functional.

    So on this machine the important distinction is:

    auth.json reset alone -> still broken / startup spinner

    auth.json + cap_sid reset together -> recovered startup AND multi-turn

    This appears consistent with persisted authentication/account-session state contributing to the Windows Desktop failure. It may also be relevant that there is another Windows report (#19756) where both auth.json and cap_sid had to be cleared for a true session reset.

    I have not yet completed the stronger cold-boot test (full Windows restart). I will report whether the issue returns after that, since historically this machine's second-turn failure returned after app/Windows restarts.

  6. arasht52 commented on Sep 26, 2026

    @arasht52

    Follow-up after the workaround test: the fix has now survived a full Windows restart.

    Test sequence/results on this machine:

    • Renaming/resetting auth.json alone: did NOT fix the problem; after signing in again, Codex returned to the infinite loading state.
    • Renaming/resetting both auth.json and cap_sid, then signing in again: Codex started normally.
    • Multiple consecutive turns then worked normally (the previous second-message / pre-turn/start hang did not occur).
    • Closing Codex normally and reopening it: still worked.
    • Full Windows restart, then launching Codex without any further auth/file changes: still works and multi-turn remains functional.

    So, at least on this machine, rebuilding both persisted auth/session artifacts appears materially different from rebuilding auth.json alone, and the recovery persists across a cold Windows restart. This may be useful when investigating stale/corrupted persisted session state during Windows Desktop startup.

  7. Toromizu0c0 commented on Sep 26, 2026

    @Toromizu0c0

    I can reproduce the same issue on a newer build.
    Environment

    • Windows 11 build 26200
    • ChatGPT/Codex Desktop: 26.924.2738.0
    • ChatGPT Classic works normally
    • Web version works normally
    • Codex CLI works normally
      Behavior
    • First message in a new conversation succeeds.
    • Second message remains stuck indefinitely.
    • Creating another new conversation repeats the same pattern.
    • After signing out, the new app can also become stuck on an endless loading spinner.
      I also ran codex doctor:
    • Auth configured
    • Stored ChatGPT tokens present
    • WebSocket connected successfully
    • HTTP 101 Switching Protocols
    • Provider endpoints reachable
    • Desktop assets CDN reachable
    • 0 fail
      So this issue still reproduces on 26.924.2738.0.
  8. arasht52 commented on Sep 26, 2026

    @arasht52

    @Toromizu0c0 I hit the same endless loading spinner after signing out. One workaround has been stable on my Windows machine, so it may be worth testing on your 26.924.2738.0 build:

    1. Fully close Codex (including its processes).
    2. Open %USERPROFILE%\.codex.
    3. Rename auth.json (keep it as a backup rather than deleting it).
    4. Rename cap_sid as well.
    5. Launch Codex and sign in again.

    Important result from my testing: resetting auth.json alone did not fix the issue. Resetting both auth.json and cap_sid did. After that, the endless startup spinner disappeared and multiple consecutive turns worked normally. The recovery also survived closing/reopening Codex and a full Windows restart.

    If you can reproduce the recovery on your newer build, that would be useful evidence that stale/corrupted persisted session state may be involved.

  9. arasht52 commented on Sep 27, 2026

    @arasht52

    Important follow-up/correction to my earlier workaround report: the recovery from resetting both auth.json and cap_sid was not permanent. It survived one Windows restart, but after a later cold boot the Windows Desktop app returned to the endless loading/reconnecting behavior.

    This time the UI exposed a concrete HTTP authentication failure instead of only spinning. Repeated requests showed:

    unexpected status 401 Unauthorized: Missing bearer or basic authentication in header

    Endpoint: https://api.openai.com/v1/responses

    The UI showed Reconnecting 5/5, and multiple separate requests failed with the same 401/missing-auth-header error.

    So the current observed sequence on this machine is:

    1. Broken state / startup spinner or second-turn hang.
    2. Resetting auth.json alone does not recover it.
    3. Resetting both auth.json and cap_sid, then signing in, recovers startup and multi-turn operation.
    4. Recovery can survive close/reopen and at least one Windows restart.
    5. After a later cold boot, the broken state can return.
    6. In the returned broken state, Desktop is visibly sending /v1/responses requests that the server rejects with 401 Unauthorized: Missing bearer or basic authentication in header.

    This seems especially relevant to the persisted-session/auth hypothesis: the app can appear to have restored a signed-in/session state while an outgoing Responses API request is missing the required Authorization header. The reset workaround should therefore be considered temporary, not a permanent fix.

  10. arasht52 commented on Sep 27, 2026

    @arasht52

    Additional live-state observation from another reproduction of the second-turn hang.

    While the second message was visibly stuck before a response/turn started, I kept the Codex Desktop process open and inspected only file metadata (no cookie/session contents were opened or shared) under the packaged app's Chromium/WebView profile:

    %LOCALAPPDATA%\Packages\OpenAI.Codex_2p2nqsd0c76g0\LocalCache\Roaming\Codex\web\Codex\Default

    The app was not globally frozen. During the live hang, the Default\Network profile continued to be updated. In particular, while the turn remained stuck, timestamps advanced on items including:

    • Network\TransportSecurity
    • Network\Cookies / Cookies-journal
    • Network\Network Persistent State
    • Network\Reporting and NEL

    By contrast, Local Storage, Session Storage, and WebStorage had substantially older modification timestamps.

    This does not prove that this specific stuck turn received the previously observed 401 Missing bearer or basic authentication in header; I could not inspect the request directly because this build exposes no Developer Tools option in the UI. But it does show that during the second-turn hang the Chromium/WebView network layer remains active and persists network state rather than the whole Desktop app simply freezing.

    Combined with the separate reproduction where /v1/responses explicitly returned 401 Unauthorized: Missing bearer or basic authentication in header, this may help narrow the failure to the Desktop auth/request/session path rather than a total renderer/network freeze.

  11. arasht52 commented on Sep 27, 2026

    @arasht52

    Stronger controlled workaround result from the same machine:

    After another reproduction of the second-turn hang, I first tried the previously reported auth reset again (auth.json + cap_sid). This time that was not sufficient: after signing back in, the turn still remained stuck/pending.

    I then fully closed Codex, ensured its processes were stopped, and changed only the persisted Chromium/WebView network profile by renaming:

    %LOCALAPPDATA%\Packages\OpenAI.Codex_2p2nqsd0c76g0\LocalCache\Roaming\Codex\web\Codex\Default\Network

    to:

    Network.bak

    No other WebView profile directories were deleted or reset in that step.

    On the next launch, Codex recovered and the previously failing behavior worked again.

    So on this reproduction:

    • Reset auth.json + cap_sid -> did not recover the hang
    • Preserve everything else, rename only Default\Network, allowing WebView to recreate it -> recovered

    This is consistent with the earlier live-hang observation that Default\Network remained active and was updating Cookies, Network Persistent State, Reporting and NEL, etc. while the turn was stuck. It also fits the separate observed /v1/responses failure with 401 Unauthorized: Missing bearer or basic authentication in header.

    I have kept the old Network.bak profile rather than deleting it. It may contain sensitive cookies/session data, so I will not upload or expose it publicly, but can preserve it in case maintainers want specific non-sensitive metadata or a targeted diagnostic from it.

    This does not yet establish the exact corrupt entry/file inside Default\Network, but it narrows the workaround/root-cause area beyond the .codex auth files to persisted Chromium/WebView network state.

  12. arasht52 commented on Sep 28, 2026

    @arasht52

    Additional environment/isolation result from the current reproduction:

    Windows Desktop is already on 26.924.2738.0 (confirmed in Windows Installed Apps), and the second-turn/pending-turn problem still reproduces on that build.

    At the same time, on the same Windows machine, same network, and same account, Codex CLI works normally:

    • Codex CLI: v0.155.0
    • First turn succeeds
    • A second conversational turn also succeeds and correctly retains context from the first turn

    So while Desktop 26.924.2738.0 is stuck, CLI multi-turn remains healthy in parallel.

    Also, the previously reported Default\\Network rename/reset is not a durable workaround. It recovered Desktop temporarily, but the problem returned and the Network profile had to be regenerated again (.bak2, .bak3 during subsequent attempts). Resetting the entire WebView Default profile also did not provide a durable recovery.

    Current isolation summary:

    • Windows Desktop 26.924.2738.0: reproduces
    • Codex CLI 0.155.0 on same machine/account/network: multi-turn works
    • .codex auth reset: inconsistent/temporary
    • WebView Default\\Network reset: temporary only
    • Entire WebView Default profile reset: not a durable fix

    This further points toward a Windows Desktop-specific request/session/app-server integration issue rather than a general account, quota, network connectivity, or Codex backend failure.

  13. diegoestesi-byte commented on Sep 29, 2026

    @diegoestesi-byte

    Additional reproduction on Windows Desktop 26.924.2738.0.

    Besides the cold-start loading problem, the same installation also shows an in-session failure:

    • A turn may execute and finish, but the Desktop UI remains stuck in a loading/running state.
    • In other cases, the next turn remains pending indefinitely.
    • Restarting only the Desktop's direct codex.exe ... app-server child can temporarily restore the UI and sometimes reveals the response that had already completed.
    • The issue then recurs, sometimes after only one response.

    Windows Repair and reinstall did not resolve it. Local repositories/projects are not the source of the failure and have been left untouched.

    Local logs show app-server initialization/handshake succeeding before the Desktop UI becomes stuck. Repeated No owner repo found for remote task warnings are also present, although I cannot establish that they are causal.

    Impact is severe: Codex Desktop cannot be used reliably for ongoing project work because each conversation can require manual backend recovery. Please investigate the Desktop renderer/request-state/app-server integration on this build.

  14. diegoestesi-byte commented on Sep 29, 2026

    @diegoestesi-byte

    Additional symptom from the same affected Windows Desktop 26.924.2738.0 installation:

    • When a message/turn becomes stuck after pressing Enter, fully closing Codex Desktop and terminating/restarting its processes does not clear that pending UI state.
    • On the next launch, Desktop restores the same conversation with the already-submitted text still present at the same stuck/loading point.
    • At the same time, an important local repository/project that was previously available in Codex does not finish loading/rehydrating in the Desktop UI.
    • The repository files themselves have not been deleted; the problem appears to be Desktop restoring a persisted stuck conversation/task state while failing to reattach or hydrate the associated workspace/repository.
    • Local logs from prior reproductions repeatedly showed No owner repo found for remote task, though causality is not established.

    This persistence across full process restarts is important: the broken state is not only in-memory. Desktop is restoring a persisted pending/streaming/task state on relaunch, and the project/workspace association may also be failing to restore correctly.

  15. diegoestesi-byte commented on Sep 29, 2026

    @diegoestesi-byte

    Additional reproducible symptom on the same affected Windows Desktop installation (26.924.2738.0):

    Creating a brand-new project/work item also hangs indefinitely.

    Observed behavior:

    • Open Work.
    • Enter a new prompt such as "Proyecto nuevo".
    • Submit.
    • The blue loading spinner remains active indefinitely.
    • No usable project/thread is created in the UI.

    This is not limited to reopening an existing broken repository/thread: even a fresh project attempt can get stuck at submission/start. A screenshot from the affected installation shows the Work composer with the submitted text and the spinner running indefinitely.

    Combined with the earlier observations (cold-start Loading, pending turn restored after relaunch, important local repository failing to rehydrate), this suggests the failure affects both restoration of existing project state and creation/start of new project/task state in the Windows Desktop frontend/app-server integration.

  16. chopper10elf-lan commented on Oct 3, 2026

    @chopper10elf-lan

    Confirmed fixed on my Windows machine — root cause was a stale persistent CODEX_CLI_PATH override
    I can now confirm that the long-standing Codex Desktop issue I had been experiencing since the initial GPT-6 Astra rollout is resolved.
    In my case, the root cause was a persistent user-level CODEX_CLI_PATH environment variable pointing to an old Codex runtime:
    C:\Users\Administrator\AppData\Local\Programs\OpenAI\Codex\bin\codex.exe

    That executable reported:
    codex-cli 0.146.0

    Meanwhile:
    Standalone npm Codex CLI: 0.160.0
    Codex Desktop package: 26.930.2377.0

    So even though both the Desktop shell and standalone CLI were current, Codex Desktop was still being forced to launch the very old 0.146.0 runtime through CODEX_CLI_PATH.
    This explained the behavior I had seen for a long time:

    • GPT-6 Astra was available in VS Code Codex / CLI but missing from Codex Desktop.
    • Reinstalling Codex Desktop did not help.
    • Some persisted conversations could be opened normally in VS Code Codex and with codex resume, while Desktop failed to restore them.
    • One affected thread produced:
      failed to deserialize stored thread item ...
      unknown variant completed,
      expected one of started, interacted, interrupted

    The stored rollout data itself was still intact.
    I first updated the standalone CLI, then checked both the normal CLI and the runtime referenced by CODEX_CLI_PATH. That exposed the version mismatch:
    codex --version

    $forced = [Environment]::GetEnvironmentVariable("CODEX_CLI_PATH","User")
    $forced
    & $forced --version

    The fix was to remove the stale user-level override:
    [Environment]::SetEnvironmentVariable(
    "CODEX_CLI_PATH",
    $null,
    "User"
    )

    Remove-Item Env:CODEX_CLI_PATH -ErrorAction SilentlyContinue

    I then restarted Windows so Explorer and Desktop shortcuts inherited the clean environment.
    After reboot, Codex Desktop was no longer forced to use the old runtime, and the long-standing Astra/model visibility issue was resolved. The previously affected Desktop behavior also returned to normal.
    No .codex deletion, cache wipe, JSONL editing, SQLite editing, or another reinstall was required.
    For other Windows users seeing similar symptoms, I strongly recommend checking all three scopes:
    [Environment]::GetEnvironmentVariable("CODEX_CLI_PATH","Process")
    [Environment]::GetEnvironmentVariable("CODEX_CLI_PATH","User")
    [Environment]::GetEnvironmentVariable("CODEX_CLI_PATH","Machine")

    and comparing the version of the executable referenced there with:
    codex --version

    In my case, this was an upgrade/migration/runtime-selection problem, not an Astra entitlement problem and not actual conversation data loss.
    I hope this helps anyone else who has been stuck with the same Windows Desktop behavior.

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-serverbugwindows-os

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions