Repository navigation
[Windows] Threads stuck on "Waiting for worktree setup…", app auto-quits: projector rejects own token_count record (invalid type: map, expected f64) and cursor desyncs (expected ordinal 10, got 11) #42794
Description
What version of the Codex App are you using?
- Codex Desktop
26.901.4073.0(Microsoft Store MSIX), native Windows x64 (build 10.0.26200), PowerShell as default shell - Bundled app-server:
codex-cli 0.145.0-alpha.18
What subscription do you have?
Plus
What issue are you seeing?
Since updating to 26.901.4073.0, new threads intermittently get stuck forever on "Waiting for worktree setup…" / "Starting your task" even when the run target is Local, and sometimes the app closes itself without any crash report. The stuck state is thread-correlated (first conversation may work, a later one sticks; sometimes the very first one sticks) and survives app restarts.
Observable symptoms, all verified from ~/.codex/logs_2.sqlite, state_5.sqlite and the rollout file:
-
The composer is disabled and the user_input never reaches the app_server. The stuck thread exists only as an empty shell: a
threadsrow withhas_user_event=0,model=NULL, and no rollout file written. So this is not the model/backend being slow — the UI state machine refuses to dispatch the message. -
The paginated history projector rejects the thread's own
token_countrecord, then the projection cursor desyncs and every later record is rejected too:[codex_thread_store::local::thread_history_materialization] WARN skipping rejected rollout line while projecting "C:\Users\<me>\.codex\sessions\2026\09\04\rollout-2026-09-04T23-25-24-01a06d06-....jsonl": invalid type: map, expected f64 at line 1 column 846The rejected line is
ordinal=10,type=event_msg,payload.type=token_count, exactly 846 bytes (so the reported column points at end-of-line). It contains the newrate_limitsstructure written by this same build:"rate_limits":{"limit_id":"codex","limit_name":null,"primary":{"used_percent":20.0,"window_minutes":300,"resets_at":1788544770},"secondary":{"used_percent":3.0,"window_minutes":10080,"resets_at":1789131570},"credits":{"has_credits":false,"unlimited":false,"balance":"0"},"individual_limit":null,"spend_control_reached":null,"plan_type":"plus","rate_limit_reached_type":null}
All 12 lines of the rollout parse as valid JSON independently — the file is not corrupt; the projector schema just doesn't match what the writer produces.
-
After the rejection the projection cursor desyncs and the turn can never be persisted:
[codex_thread_store::local::live_writer] WARN failed to project durable rollout for 01a06d06-...: thread-store internal error: thread history projection for 01a06d06-... expected ordinal 10, got 11The following
task_complete(ordinal 11) is rejected as well, so the turn never materializes even though the model call itself completed fine (token usage 22672 in / 12 out is logged). -
While stuck, the app_server log floods with
app/list→app/list/updated(targeted_connections=0) plus a newcodex_http_client::custom_caHTTP client per request, hundreds of times per minute. Eventually the app_server process terminates silently (no Windows Application Error, no WER crash entry, no panic in logs — only genericMoAppHangAppHang reports for the UI earlier in the day), and the desktop window closes by itself. -
Enabling/disabling user MCP servers changes the timing/probability but not whether it happens: it reproduced with all user MCP servers enabled, with only one enabled, and with all of them disabled.
Steps to reproduce
Not fully deterministic, but it reproduced many times within a single day on this build:
- Codex Desktop 26.901.4073.0 on Windows, PowerShell shell (note: every thread logs
Failed to create shell snapshot for powershell: Shell snapshot not supported yet for PowerShell). - Start new conversations (target = Local) and send short messages.
- Intermittently, a thread sticks on "Waiting for worktree setup…". The stuck thread's rollout is either missing or contains a
token_countrecord that the projector rejects withinvalid type: map, expected f64, followed byexpected ordinal 10, got 11for the rest of the session. - After minutes the app either recovers the stuck turn or the app_server dies silently and the window closes.
Expected behavior
The paginated history projector should tolerate volatile telemetry fields written by its own writer (e.g. rate_limits), and the projection cursor should resynchronize after a rejected record instead of rejecting all subsequent records including task_complete.
Suggested fix
- Lenient/untagged deserializer for volatile fields such as
rate_limits(same family as Paginated history projector rejects legacy duration objects withinvalid type: map, expected f64#41276:invalid type: map, expected f64). - Auto-resync of the projection cursor after a skipped record (closely related to Resume opens a long thread at its first turn: 0.146.1 desynced thread_history projection cursors, and later versions never repair them #38792).
- A supported
repair/rebuild-projectioncommand so users don't have to hand-edit SQLite.
Related issues
- Paginated history projector rejects legacy duration objects with
invalid type: map, expected f64#41276 — same projector error string, different field (legacy duration objects) - Resume opens a long thread at its first turn: 0.146.1 desynced thread_history projection cursors, and later versions never repair them #38792 — projection cursor desynchronization is not automatically repaired
- Option–Space window stuck on “Waiting for worktree setup…” #40253, Windows App worktrees stay stuck on "Fetching worktree details", and project chat cannot send the first manual message #19500 — stuck on "Waiting for worktree setup" / first message
- Windows Desktop: bundled node_repl MCP processes leak one-per-thread, never reaped until app-server exit #35485, Codex-injected Node REPL starts for every unused subagent and is not reaped #42005 — node_repl process leaks observed in the same sessions but likely unrelated to this root cause
Happy to provide the full 12-line minimal rollout sample and additional log excerpts if useful.
Activity
github-actions commentedon Sep 4, 2026
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
token_countevents #42025Powered by Codex Action
84dnnvbdvp-debug commentedon Sep 4, 2026
Source history suggests this may be two already-fixed projector defects reappearing because the Desktop package is bundling an older app-server.
The reported
codex-cli 0.145.0-alpha.18maps torust-v0.145.0-alpha.18, tagged July 16. That version predates:2bd8727(Aug 13), which changed persisted rollout decoding specifically because nested floats inside flattened/internally-tagged records could fail underserde_json/arbitrary_precision. Its regression fixture is atoken_countevent with floatingrate_limits.primary/secondary.used_percent, i.e. the same record family here.095ac4f(Sep 2), which changed thread-history projection so an unknown/invalid record advances the byte checkpoint and a later forward ordinal becomes aSkippedOrdinalRangeinstead of poisoning all subsequent projection. That directly addresses theexpected ordinal 10, got 11cascade.So I would first run the sanitized 12-line rollout through current
main(or another build known to include both commits) before adding a newrate_limits-specific deserializer. If it projects cleanly there, the useful boundary is likely Desktop packaging/version skew: the Sept 4 app is shipping an app-server old enough to miss both fixes. If it still fails on current source, then the exact current record is a new compatibility case worth isolating.A regression for the Desktop packaging path could assert that the bundled app-server can project a
token_countrecord with the current structuredrate_limitspayload and continue through the followingtask_completeordinal.nt49949390 commentedon Sep 6, 2026
I'm experiencing the same issue on Windows with Codex version 26.901.4073.0.
Codex gets stuck on “Starting your task” and never proceeds. Restarting the Codex app does not resolve the issue.
This appears to be the same behavior described in this issue.
Windows 11
Codex version: 26.901.4073.0
divyanshj16 commentedon Sep 6, 2026
I am also getting this issue on the codex app via vscode. Is there any workaround?
Demimonde5000 commentedon Sep 13, 2026
I’m experiencing similar symptoms on Windows app version 26.908.4834.0 with ChatGPT Pro.
Work locally hangs indefinitely at “Starting your task,” even for “hello.” Navigating away causes the new chat to disappear. This happens in two projects and outside projects. Codex also fails to respond.
Cloud Work works outside the affected project, but Cloud is greyed out within that project.
Closing/reopening the app and using Windows’ Repair option did not resolve the problem.
I submitted diagnostic feedback:
no-active-thread-01a09cc6-985e-7982-9f35-17648796315a
Could you check whether the submitted logs indicate the same startup issue?