Repository navigation
Codex Desktop session stuck as follower after backend thread is idle #24217
Description
What version of the Codex App are you using (From “About Codex” dialog)?
26.519.41501
What subscription do you have?
Pro
What platform is your computer?
Darwin 25.5.0 arm64 arm
What issue are you seeing?
Environment:
- Codex Desktop macOS
- Version: 26.519.41501
- CLI could continue the same thread successfully
- Desktop rendered the thread but kept spinner/status active and blocked Send/Stop
Symptoms:
- Desktop showed the session as still running.
- Send was blocked.
- Stop did not recover the session.
- Restarting Desktop did not fix it.
- CLI could load/continue the session.
Diagnostics:
- Backend
thread/readreturned the thread as idle/complete. - Backend
thread/resumereturned idle/complete state. - Desktop renderer
thread-role-for-hostreturnedfollower. assert-thread-follower-owner-for-hostfailed with:
"Please continue this conversation on the window where it was started."- Clearing Desktop stream roles and then running the normal resume path with
workspaceRootschanged the role toownerand recovered the thread.
Expected:
If backend state is idle/complete and no owner window exists, Desktop should not keep the thread blocked as a follower. It should either clear the stale follower role or resume ownership.
Actual:
Desktop kept a stale follower/owner routing state even though the backend thread was idle.
Related: #20754, #12852, #21360. This may be the same family of bug, but this report adds a more specific diagnostic: Desktop stayed in follower mode while backend thread state was idle/complete.
What steps can reproduce the bug?
I do not have a deterministic minimal reproduction yet.
Observed reproduction pattern:
- Use Codex Desktop on macOS with a local workspace.
- Work in a thread for multiple turns.
- At some point, the Desktop UI keeps showing the thread as active/spinning even though the underlying task has completed.
- Reopen/restart Codex Desktop.
- The same thread still renders content, but the status remains active/spinning and Send/Stop are blocked.
- Load or continue the same thread from Codex CLI.
- CLI can continue the thread successfully, but Desktop still treats the thread as blocked.
- Inspecting Desktop renderer state showed the thread role as
follower, while backendthread/readandthread/resumereturned the thread as idle/complete. - Clearing Desktop stream roles and then triggering the normal resume path with
workspaceRootschanged the role toownerand recovered the thread.
The important diagnostic shape is: Desktop follower/owner routing state was stale while backend thread state was idle.
What is the expected behavior?
Codex Desktop should not keep a local thread blocked as a follower when the backend thread state is idle/complete and no owner window is available.
Expected behavior:
- If the backend reports the thread as idle/complete, Desktop should clear any stale active/spinning UI state.
- If a follower/owner route is stale, Desktop should recover ownership or fall back to a normal resume path.
- Send and Stop should not remain blocked indefinitely.
- Restarting Desktop should not restore the same stale follower state.
- Desktop and CLI should agree on whether the thread is usable.
Additional information
Additional diagnostics from the affected run:
- Codex Desktop version: 26.519.41501
- Platform: macOS arm64
- CLI could load/continue the same thread while Desktop could not.
- Desktop
thread-role-for-hostreturnedfollower. - Desktop
assert-thread-follower-owner-for-hostfailed with:
"Please continue this conversation on the window where it was started." - Backend
thread/readreturned the thread as idle/complete. - Backend
thread/resumereturned the thread as idle/complete. - The Desktop app-state snapshot showed stale streaming/follower counters before repair, including streaming follower threads without active runtime.
- Running
discard-conversation-from-cachefor the affected conversation reduced the stale counters but did not fully recover the thread. - Running
mark-all-conversations-need-resume-after-reconnect-for-hostcleared the streaming/follower counters. - Triggering the normal resume path with the required
workspaceRootsthen changed the thread role fromfollowertoowner, and the thread became usable again.
Activity
github-actions commentedon May 23, 2026
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action
sdro commentedon May 23, 2026
Advanced workaround that recovered my session
Warning: this uses internal Codex Desktop renderer APIs and may change in future versions. Do not paste session transcripts, local paths, logs, prompts, screenshots, or private project data into public issues.
Replace:
<THREAD_ID>with the affected Codex thread/session id<WORKSPACE_ROOT>with the workspace root for that threadpkill -f "/Applications/Codex.app" open -na /Applications/Codex.app --args --remote-debugging-port=9223After that, the affected Desktop thread accepted input again.
This workaround should not edit the session JSONL. It resets in-memory Desktop stream ownership state and then asks Desktop to resume the affected thread normally.
nos1609 commentedon Aug 28, 2026
Additional sanitized reproduction from Codex Desktop on Windows ARM64 controlling a Remote SSH Linux task.
Environment:
26.825.4187.0codex@26.825.32147151.0.7922.1740.150.1Observed:
This is the owner-side variant of the stale role bug: one task remained a
streaming_ownerdespite having no active runtime. Navigating away and unloading/reloading only the affected task restored its transcript projection, but did not clear the stale owner state or re-enable submission.Expected:
No thread IDs, turn IDs, paths, hostnames, addresses, repository names, prompts, credentials, account data, or raw logs are included.
berkyuo2-cpu commentedon Aug 28, 2026
Additional sanitized local Windows x64 reproduction (2026-08-28). This overlaps #24287, but the strongest diagnostic matches this issue: Desktop reports an active turn while the conversation service says there is no active turn ID.
Environment
OpenAI.Codex_26.818.8289.0_x64__2p2nqsd0c76g019045codex-cli 0.144.1Observed
A previous turn was explicitly interrupted. A later short follow-up was submitted in the same thread.
Desktop stayed on
Thinkingwith the Stop control visible.Repeated read-only task snapshots reported the thread as
activeand the latest turn asinProgress, but the turn had zero items, with no assistant message and no tool marker, for more than 68 minutes.Two supported app-level follow-up/steer attempts were rejected after waiting with this error (conversation ID redacted):
Navigating away/back and refreshing the exact task did not reconcile the state.
The background PowerShell row visible in the UI did not correspond to another live matching PowerShell process at diagnosis time. The Codex process registry JSON also passed its guarded health audit (valid JSON array, zero NUL bytes, no repair needed).
A same-directory fork from completed history accepted a new follow-up, but the child also immediately remained
active/inProgresswith zero items, no assistant message, and no tool marker for repeated 30-second observation windows.Other Desktop/app-server operations remained responsive (
list,read, andwaitworked), so this was not a full application or network outage.The important state split is therefore:
This looks like stale active/owner routing or long-history hydration causing the next prompt to be classified as
turn/steereven though the backend has no steerable turn. The fork reproduction suggests the stale classification can also survive reconstruction from completed history, rather than being caused only by a dead shell command.Expected
turn/startpath.Thinking.inProgressturn that has produced zero events for an extended interval.I intentionally did not restart the app or mutate internal thread state before collecting the evidence. No thread/turn IDs, usernames, local paths, repository names, prompts, device identifiers, screenshots, credentials, or raw logs are included.