Codex Desktop renderer reload left turn state out of sync and spammed Item not found in turn state
Summary
Codex Desktop appeared to crash or reload while work was in progress. Local evidence does not show a full main-process/app-server restart. Instead, the logs show a renderer startup/reload signature, followed by placeholder turn rebinding and thousands of Item not found in turn state errors.
This report is intentionally framed as a renderer/UI state rehydration problem rather than a confirmed full Desktop process crash.
Environment
- Product: Codex Desktop on Windows 11 with WSL2 Ubuntu workspace
- Desktop package observed in logs:
OpenAI.Codex_26.519.5221.0 - Desktop release string observed in logs:
26.519.41501 - WSL app-server binary:
codex-cli 0.130.0-alpha.5 - Related same-session stall issue: #24260
- Related same-session trace upload/loss issue: #24262
What the user saw
While investigating a stuck Thinking turn and after sending a message, the Desktop UI appeared to crash/reload. The user then resumed investigation in the same Desktop session.
What the logs show
There was no clear evidence of a full main process restart:
- The same
codex-desktop-...log file continued after the incident. - No new Desktop log file appeared at the suspected crash/reload time.
- The app-server connection showed startup/connected only near original app launch, not a new reconnect/restart at the incident time.
- No recent Windows WER/CrashDumps were found for Codex/Electron in the checked locations.
- The local Sentry queue did not appear to contain a pending crash report.
However, around 2026-05-23T19:15:41Z the log has a strong renderer startup/reload signature:
2026-05-23T19:15:41.195Z response_routed method=remoteControl/status/read ...
2026-05-23T19:15:41.252Z response_routed method=thread/read conversationId=<redacted> ...
2026-05-23T19:15:41.262Z response_routed method=thread/read conversationId=<redacted> ...
2026-05-23T19:15:41.982Z [desktop-notifications] service starting
2026-05-23T19:15:41.990Z [startup][renderer] app routes mounted after 1672ms
2026-05-23T19:15:41.991Z Handled 'ready' message, sent ide-context-updated
2026-05-23T19:15:42.399Z bundled_plugins_reconcile_started ... reason=startup
Shortly after that, the renderer/client started rebinding placeholder latest turns:
2026-05-23T19:16:04.132Z Rebinding placeholder latest turn to incoming event conversationId=<redacted> turnId=<redacted>
2026-05-23T19:16:09.515Z Rebinding placeholder latest turn to incoming event conversationId=<redacted> turnId=<redacted>
Then the UI/client state went into a repeated missing-item failure pattern:
2026-05-23T19:16Z-19:33Z error [electron-message-handler] Item not found in turn state itemId=<redacted>
Local count from the log:
Item not found in turn state total in current log: 3875
After renderer reload window, 19:16Z-19:33Z: 3825
Several minutes contained repeated bursts of 106, 212, 318, or 424 errors/minute.
There were also request/state symptoms during the same window:
2026-05-23T19:16:15.723Z Timed out waiting for MCP response to experimentalFeature/list
2026-05-23T19:16:16.221Z response_orphaned ... requestId=experimentalFeature/list:<redacted>
2026-05-23T19:16:16.224Z No promise for request ID id=experimentalFeature/list:<redacted>
Expected behavior
If the renderer reloads or crashes while threads are active:
- the app should durably log a renderer crash/reload reason, if available;
- thread/turn state should be rehydrated idempotently from the app-server/session store;
- placeholder turn rebinding should not leave existing streamed items orphaned;
- the UI should not spam
Item not found in turn statefor many minutes; - if recovery is impossible, the UI should show a clear recover/reload state rather than silently corrupting the visible turn state.
Actual behavior
After apparent renderer reload:
- Desktop main/app-server logs continued without a full reconnect/restart;
- renderer startup messages appeared;
- active threads were read again and latest turns were rebound;
- the client emitted thousands of
Item not found in turn stateerrors across many item IDs; - there was no obvious durable crash artifact to explain the renderer reload.
Related issues
Possibly related but not exact duplicates:
- #14812: thread/history restore issues with
Item not found in turn stateafter restart in the VS Code extension - #9679:
Item not found in turn statewith chat/completion protocol/custom provider path - #18471: Desktop reconnecting UI while app-server transport appears connected
8 Comments
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action
Additional same-session evidence after the renderer reload/crash:
The failure mode is stronger than just "thread state has stale/missing items." In the same Desktop session, after the renderer recovered, a submitted user message was not visible in the originating thread UI, but the backend/app-server still received it and continued executing work. The effect from the user perspective was an invisible active turn: no visible user bubble, no assistant progress stream, no visible tool calls, and no reliable in-thread indication that the work existed, even though local session JSONL continued to append new assistant messages and tool calls.
Sanitized local log shape from the same period:
The important extra observation is that the app-server/work backend and the renderer-visible conversation model can diverge in both directions:
Related linked issues from the duplicate bot are relevant but not exact duplicates:
Item not found in turn state,Received turn/started for unknown conversation, and interrupted turns resumed asmarkedStreaming=true.task_startedwithouttask_completecausing LocalConversationPage recovery failure; a later comment there is especially close to this symptom: session JSONL still contains tool calls and the backend can access them, but the frontend silently omits them after reopen.auth_elicitationfeature mismatch plusunknown conversationand missing item state errors.turn_completed, browser route cleanup, and turn-complete notification display.Expected behavior: if the renderer loses ownership or cannot map a backend conversation/turn after reload, Desktop should either rehydrate the active turn from session/app-server state, show a recovery banner with the affected conversation, or fail the turn visibly. It should not keep executing a user-submitted turn invisibly with no visible user message, no progress stream, and no in-thread way to stop or follow up.
Second-order duplicate-chain addendum:
A few linked issues from the #23035/#23725/#23814 chain are also relevant to the renderer/session-state side of this report:
unknown conversationrouting errors andmarkedStreaming=trueduring resume.Oops, an error occurredafter update, withReceived turn/started for unknown conversationandthread/goal/get failed: goals feature is disabledin local logs.These reinforce that this issue is probably part of a broader renderer/app-server/session ownership problem rather than a single corrupt JSONL file. The unique additional symptom here is invisible active work: a user-submitted follow-up can be accepted and executed after renderer reload while the originating thread UI does not show the sent message, assistant stream, or tool progress.
Additional local log evidence from the same repro session, after locating the Desktop log file:
Environment/version:
26.519.5221.0In the current Desktop log for the repro session, the renderer remounted at
2026-05-23T19:15:41.990Z:Immediately after that remount, the renderer/app-server rehydration path resumed multiple conversations and then marked completed turns as streaming:
Aggregate counts in this single Desktop log:
Received turn/started for unknown conversation: 13Received turn/completed for unknown conversation: 4Item not found in turn state: 5,466Rebinding placeholder latest turn: 2maybe_resume_success: 4broadcastFallback=true: 0targetDestroyed=true: 0This suggests the renderer reload/recovery path can incorrectly rehydrate completed turns as
markedStreaming=true, then accept incoming events for placeholder turns whose item state does not contain the relevant tool-call IDs. That produces repeatedItem not found in turn stateerrors and later allows backend work to continue for conversations the renderer considers unknown or does not visibly own.A plausible fix/invariant from this evidence:
thread/resumeshould not mark a completed latest turn as streaming unless the app-server can also prove there is an active runtime/turn route for that exact turn.turn/startedorturn/completedfor an unknown conversation, it should surface a recovery/reattach banner or force a thread re-read, not only log and continue.Complete Solution Submitted
Root Cause
1|---
2|title: "Codex Desktop renderer reload left turn state out of sync and spammed Item not found"
3|issue: https://github.com/openai/codex/issues/24263
4|repo: openai/codex
5|type: bug-fix
6|area: app, session, windows-os
7|competition: low (4 comments, detailed evidence from reporter)
8|quote: $1,500-$2,500
9|---
10|
11|
12|
13|After a renderer reload/crash, the Desktop app spams "Item not found in turn state" errors. The renderer's tu
Key Fixes
Testing Strategy
Files
Full solution document:
codex-24263-renderer-reload-item-not-found-fix.md---
Submitted via automated solution pipeline. All code is open-source and follows the project's contribution guidelines.
Still reproduces on macOS with Codex Desktop 26.609.41114 build 3888.
Fresh repro:
The app showed the loading screen/reload behavior, but agents/app-server continued.
After the renderer crash/reload, the same Desktop log shows the same recovery pattern:
This confirms the issue still reproduces on a newer macOS Desktop build, and with a real renderer Crashpad artifact rather than only inferred renderer reload.
Fresh Windows + WSL2 reproduction on a newer Desktop build. This looks like the same renderer recovery/state-ownership bug, with one new symptom: the user-facing UI hit the generic "oops / try again" render error while the active threads continued running, and the Reload button resumed the UI.
Environment:
OpenAI.Codex_26.609.4994.0_x64__2p2nqsd0c76g026.609.41114%USERPROFILE%\.codexUser-visible symptom:
2026-06-15T15:39:51Z, the Desktop UI showed the generic "oops / try again" render error.Relevant sanitized log shape from the same Desktop log:
Surrounding state/routing symptoms:
The same window had slow
thread/listresponses, including examples around:Negative/clarifying evidence:
%USERPROFILE%\.codex\tmp\arg0root stayed WSL/Linux-only, with no shared-root Windows.bathelper pollution.node_repl.exe -> codex.exe app-server --listen stdio://sidecars were present in the post-event native inventory.%USERPROFILE%\.codex\chrome-runtime-home, but those did not poison the shared WSL helper root. This makes the repro distinct from the Windows/WSL arg0-helper collision reports.Adjacent but not proven causal:
That runtime update failure happened about 10 seconds before the LocalConversationPage error boundary, so it may be related timing pressure or may be incidental.
Why I think this belongs on this issue:
LocalConversationPageerror boundary, but the app-server/threads continued.thread/list, and missing turn-state items.Expected invariant:
LocalConversationPageshould fail-soft or force a bounded re-read/reconcile when it receives late/stale conversation events or orphanedthread/list/app/listresponses after reload. It should not trip a blank render error while backend work keeps running invisibly or semi-invisibly.This is still reproducing for me on newer Codex Desktop builds, now up to
26.616.71553.Latest incident:
2026-06-23T09:23:20Z/12:23:20 EEST26.616.715532026-06-16.Relevant log sequence:
So the earlier Crashpad-backed renderer crash variant has now become, or is accompanied by, repeated renderer remount/loading-screen events without new Crashpad dumps. The same state-rehydration pattern remains: placeholder turn rebinding,
markedStreaming=true, and repeatedItem not found in turn state.