codex - 💡(How to fix) Fix Codex Desktop on Windows refreshes app-server-updated threads only after window focus returns [1 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
openai/codex#21177Fetched 2026-05-06 06:25:20
View on GitHub
Comments
1
Participants
2
Timeline
6
Reactions
0
Timeline (top)
labeled ×4commented ×1cross-referenced ×1

Error Message

  • While Codex Desktop is unfocused, the sidebar / thread view can remain stale.
  • The app-server state is already fresh and includes the completed turn.
  • When the Codex Desktop window receives focus, the sidebar and chat content refresh immediately.
  • This reproduced multiple times across different existing worker threads.
  • It also reproduced after restarting Codex Desktop normally, without DevTools / remote debugging enabled.

Root Cause

This is especially visible in orchestration workflows where one long-lived project/orchestrator thread dispatches work to worker threads. The underlying app-server operations succeed, but the human user cannot reliably see the updated Desktop state until they manually focus the app.

Related feature request: #14923

Fix Action

Fix / Workaround

This matters for app-server-based orchestration workflows where one controller process or orchestrator dispatches work to existing Desktop threads. The work completes, but the Desktop UI may not show the completed worker thread until the user manually focuses the app.

This is especially visible in orchestration workflows where one long-lived project/orchestrator thread dispatches work to worker threads. The underlying app-server operations succeed, but the human user cannot reliably see the updated Desktop state until they manually focus the app.

RAW_BUFFERClick to expand / collapse

What issue are you seeing?

Codex Desktop on Windows does not appear to refresh its project sidebar / thread view while the window is unfocused after another local codex app-server client appends a real turn to an existing thread.

The underlying thread state is updated correctly and immediately: thread/list, thread/read, and thread/turns/list can see the new turn and the updated timestamp. However, Codex Desktop remains visually stale until the Desktop window receives focus again. As soon as the Codex Desktop window is focused, the sidebar and the opened chat update immediately.

This matters for app-server-based orchestration workflows where one controller process or orchestrator dispatches work to existing Desktop threads. The work completes, but the Desktop UI may not show the completed worker thread until the user manually focuses the app.

Environment

  • Platform: Windows
  • App: Codex Desktop
  • Transport used for the external client: codex app-server --listen stdio://
  • The issue reproduced with Codex Desktop started normally, without DevTools / remote-debugging flags.

Reproduction outline

  1. Open Codex Desktop on Windows.
  2. Keep Codex Desktop visible or available, but move focus to another application.
  3. From a separate local codex app-server client:
    • initialize / initialized;
    • thread/resume an existing Desktop thread by threadId;
    • turn/start with a minimal instruction;
    • keep observing with thread/turns/list until the turn is completed and the assistant response is present.
  4. Confirm through app-server that:
    • the new turn exists;
    • the target thread updatedAt changed;
    • thread/list / thread/read show the updated state.
  5. Observe Codex Desktop while it is still unfocused.
  6. Focus the Codex Desktop window.

Observed behavior

  • While Codex Desktop is unfocused, the sidebar / thread view can remain stale.
  • The app-server state is already fresh and includes the completed turn.
  • When the Codex Desktop window receives focus, the sidebar and chat content refresh immediately.
  • This reproduced multiple times across different existing worker threads.
  • It also reproduced after restarting Codex Desktop normally, without DevTools / remote debugging enabled.

Expected behavior

If thread state changes through supported app-server primitives, Codex Desktop should eventually refresh its visible thread list / chat content without requiring a manual focus change.

Alternatively, Codex could expose a supported, side-effect-free refresh/invalidate signal for Desktop clients so external local app-server workflows can ask the app to refresh its thread state without using private files, empty turns, DevTools/CDP, or focus-stealing.

Why this matters

This is especially visible in orchestration workflows where one long-lived project/orchestrator thread dispatches work to worker threads. The underlying app-server operations succeed, but the human user cannot reliably see the updated Desktop state until they manually focus the app.

Related feature request: #14923

extent analysis

TL;DR

The most likely fix is to implement a mechanism for Codex Desktop to refresh its project sidebar and thread view without requiring a focus change, potentially through an exposed refresh signal for external app-server workflows.

Guidance

  • Investigate the use of a supported refresh or invalidate signal that can be sent from the app-server to Codex Desktop to update its thread state without relying on focus changes.
  • Consider implementing a periodic background update mechanism in Codex Desktop to check for changes in thread state, even when the window is unfocused.
  • Review the current implementation of thread/list, thread/read, and thread/turns/list to ensure they are correctly updating the thread state and triggering a refresh in Codex Desktop.
  • Examine the possibility of using an existing API or primitive to notify Codex Desktop of changes to thread state, eliminating the need for a manual focus change.

Example

No specific code snippet can be provided without further information on the internal implementation of Codex Desktop and the app-server. However, the solution might involve adding a listener or callback function to handle updates to thread state and trigger a refresh of the sidebar and thread view.

Notes

The exact implementation details of the fix will depend on the internal architecture of Codex Desktop and the app-server, as well as any existing APIs or primitives that can be leveraged to achieve the desired behavior.

Recommendation

Apply a workaround by implementing a periodic background update mechanism in Codex Desktop to check for changes in thread state, even when the window is unfocused, until a more permanent solution can be developed and integrated.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

FAQ

Expected behavior

If thread state changes through supported app-server primitives, Codex Desktop should eventually refresh its visible thread list / chat content without requiring a manual focus change.

Alternatively, Codex could expose a supported, side-effect-free refresh/invalidate signal for Desktop clients so external local app-server workflows can ask the app to refresh its thread state without using private files, empty turns, DevTools/CDP, or focus-stealing.

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING