codex icon indicating copy to clipboard operation
codex copied to clipboard

macOS desktop: primary window stuck on loading screen while tasks continue; New Window recovers but browser state is lost

Open it-yusha opened this issue 3 months ago • 10 comments

What version of the Codex App are you using (From “About Codex” dialog)?

ChatGPT/Codex Desktop 26.803.41515 (CFBundleVersion 6321)

What subscription do you have?

Pro

What platform is your computer?

Darwin 25.5.0 arm64 arm

macOS 26.5.2 (build 25F84)

What issue are you seeing?

The primary ChatGPT/Codex desktop window intermittently becomes stuck on the blank initial loading screen (gray/white background with the OpenAI logo). This occurred several times on August 8, 2026.

The application process itself does not exit, and active Codex tasks continue running in the background. Selecting File > New Window opens a functioning window where the task and its in-progress output remain available. However, the original window does not recover, and the in-app browser tabs/state from that window are not restored in the new window.

A screenshot was captured at approximately 16:09 JST. Local desktop logs immediately before and during the occurrence showed repeated primary-renderer errors:

[desktop-notifications][global-error] ResizeObserver loop completed with undelivered notifications.
rendererWebContentsId=1
rendererWindowAppearance=primary
rendererWindowFocused=true
rendererWindowVisible=true

The errors appeared repeatedly from approximately 07:06:49 through 07:08:26 UTC. During the same period, AppServer responses continued successfully with errorCode=null and targetDestroyed=false, including thread reads, turn updates, and browser-session lifecycle events.

No new macOS ChatGPT/Codex crash diagnostic report was generated for these occurrences.

The logs also contain failures restoring in-app browser navigation history with ERR_FAILED. Raw logs are not attached publicly because they contain conversation and local environment metadata.

What steps can reproduce the bug?

The issue is intermittent, but the observed sequence is:

  1. Run the macOS ChatGPT/Codex desktop app with several Codex tasks active and in-app browser tabs open.
  2. Switch between tasks and use the in-app browser during normal work.
  3. The primary window occasionally clears and becomes stuck indefinitely on the initial loading screen.
  4. Wait; the original window does not recover.
  5. Choose File > New Window.
  6. The newly created window loads correctly and shows that the active Codex task continued running.
  7. The in-app browser tabs/state from the original window are absent.

Feedback with the current session diagnostics was uploaded under:

Feedback ID: 019f7b28-e4fe-7fb1-858a-95fd1dda8719

What is the expected behavior?

The primary renderer should remain usable while tasks and in-app browser sessions are active.

If the renderer must reload, it should recover automatically without remaining on the loading screen. Active task state and in-app browser tabs/navigation history should be preserved or restored in a replacement window.

Additional information

This appears to be a primary-window renderer/UI-state failure rather than a full application or app-server crash:

  • Active Codex work continues in the background.
  • A fresh window can reconnect to the running task.
  • The original window alone remains unusable.
  • No corresponding macOS crash report was created.
  • Repeated ResizeObserver errors correlate with the failure window.

Possibly related, but not exact duplicates:

  • #33996 — same ResizeObserver error and UI freezing, but on Windows
  • #34255 — macOS renderer/composer state desynchronization after switching chats
  • #34890 — macOS window blanks/reloads during heavy multi-thread use, but that report includes confirmed renderer OOM crashes

This report differs because the app remains alive, the task continues, no OOM/crash evidence was found, and New Window is a partial recovery that loses the in-app browser state.

it-yusha avatar Aug 08 '26 07:08 it-yusha

Potential duplicates detected. Please review them and close your issue if it is a duplicate.

  • #37541

Powered by Codex Action

github-actions[bot] avatar Aug 08 '26 07:08 github-actions[bot]

I reproduced this exact failure on Codex Desktop 26.803.41515 (build 6321), macOS arm64.

The desktop window became stuck indefinitely on the logo/loading screen, while active tasks continued normally and remained controllable remotely from my phone. There was no macOS crash report, system memory pressure, or evidence of a backend failure.

Additional diagnostics strongly correlate the renderer failure with unbounded local task history:

  • 2,341 visible/unarchived tasks using approximately 77 GB
  • One active, image/tool-heavy transcript exceeded 6.1 GB
  • Other active transcripts were approximately 225–227 MB
  • thread/turns/list for the 6.1 GB task took roughly 13.5–14.2 seconds, versus approximately 0.6 seconds for the smaller tasks
  • Desktop APIs for listing or navigating tasks could block for over 60 seconds
  • Logs included:
    • [persisted-atom] host did not respond to sync request
    • Conversation state not found
    • Received turn/started for unknown conversation
    • Received turn/completed for unknown conversation
    • repeated ResizeObserver loop completed with undelivered notifications

A sample of the oversized transcript showed most growth came from inline image-generation records and large function/tool outputs, including individual records exceeding 20 MB.

Recovery evidence:

  • Archived completed task trees using the supported thread/archive API
  • Visible tasks decreased from 2,341 to 706
  • Active session storage decreased from approximately 77 GB to 9.9 GB; archived data remained recoverable
  • Unpinned the 6.1 GB task without interrupting it
  • The task list then loaded in approximately 1.1 seconds and navigation recovered
  • SQLite integrity check returned ok
  • Running background tasks were not interrupted

This appears to be renderer/state-hydration overload rather than an app-server or job failure. One oversized task should not prevent the primary window from loading or navigating elsewhere. Lazy/byte-bounded transcript hydration and externalizing large image/tool payloads would likely prevent this failure mode.

Raw transcripts and logs are not attached publicly because they contain conversation and local-environment metadata. Sanitized excerpts can be provided privately.

juncoflockleader avatar Aug 11 '26 02:08 juncoflockleader

I am having this same or a very similar issue.

algiver avatar Aug 15 '26 00:08 algiver

Possibly related additional observation from a newer build: this may involve the same history-hydration subsystem, although the visible symptom here was a blank task pane rather than the entire window remaining on the logo screen.

Environment:

  • ChatGPT/Codex Desktop 26.810.50856 (build 6644)
  • App server 0.148.0-alpha.9
  • macOS arm64

On August 15, 2026, I reproduced a long blank task pane when opening a task with little or no visible chat history. This indicates that the selected task's own transcript size is not sufficient to explain the delay.

Sanitized desktop logs showed congestion in the app-wide App Server request queue across multiple conversations:

  • thread/resume took up to 103,918 ms
  • thread/turns/list took up to 94,513 ms
  • 77 thread/turns/list requests exceeded 10 seconds
  • queueWaitMs reached 60,006 ms
  • Two requests expired while queued
  • Slow requests were associated with tail_history and thread_hydration
  • Related errors included App server request expired while queued, Failed to load older thread turns, and Failed to load remaining thread turns after resume

Multiple tasks were being resumed or hydrated in the background through the same queue. A small task could therefore remain blank while waiting behind history requests for other tasks.

The total local history corpus may still increase the background workload, so this complements the oversized-history observation above rather than ruling it out. The immediate bottleneck in this reproduction appears to be shared request-queue congestion and cross-task hydration, rather than only the size of the task currently being opened.

Raw logs are not attached publicly because they contain conversation and local-environment metadata.

it-yusha avatar Aug 15 '26 07:08 it-yusha

Follow-up to my earlier observation:

Since around August 20, the original logo/loading-screen hang reported in this issue has not recurred at all in my environment. I no longer need to open a New Window or restart the app to recover the primary window. Because the hang itself has stopped occurring, I have also not experienced the associated loss of in-app browser state.

Around the same time, I made the following changes:

  • Moved ongoing work from an old local thread whose history had grown to approximately 14.6 GB into a completely new local successor thread in the same project, rather than branching the old thread
  • Transferred only the current state, confirmed decisions, source-of-truth locations, and remaining work
  • Reassigned the related recurring task to the successor thread
  • Verified normal production work in the successor thread
  • Archived the old thread without deleting its history or backups

Before archiving the old thread, after restarting the desktop app, another central thread took approximately 55 seconds to display its conversation history. After archiving, the same measurement took 27 seconds and 31 seconds across two restarts, for an average of 29 seconds—about 47% faster. The composer was usable immediately in both cases; send latency was not measured.

The successor production thread has remained stable and responsive since the migration.

The ChatGPT desktop app was also updated during this period, so I cannot determine whether the original renderer freeze was resolved by the app update, the reduced history-hydration workload, or a combination of both. The immediate before-and-after measurements suggest that archiving the very large inactive thread materially reduced the shared loading workload, consistent with the queue-congestion diagnostics in my previous comment.

For now, this issue is resolved in my environment. I will leave the issue open and report again if the original primary-window hang recurs.

it-yusha avatar Aug 24 '26 08:08 it-yusha

Additional reproduction on a newer macOS desktop build, with cross-device evidence that the task completed while the primary Mac window remained stale.

Environment

  • ChatGPT/Codex Desktop: 26.908.40834 (build 8881)
  • macOS 26.6.2 (build 25G83)
  • Apple Silicon (arm64)

Observed sequence

  1. Start a Codex task remotely from an iPhone.
  2. Return to the Mac and continue the same task in the desktop app.
  3. Send several follow-up prompts from the Mac.
  4. The Mac window remains indefinitely in the Thinking state and displays none of the assistant replies, making the task appear frozen.
  5. Open the same task remotely on the iPhone.
  6. All of the prompts and completed assistant replies are present on the iPhone, including replies that never appeared on the Mac.
  7. The Mac window still remains stale until the UI is recovered separately.

This indicates that the turn execution and persisted task state completed successfully, while only the Mac renderer or live state subscription failed to catch up.

Sanitized local evidence

During the affected period, the Mac desktop log contained 84 occurrences between 2026-09-14T13:07:37Z and 2026-09-14T14:01:12Z of:

[electron-message-handler] [desktop-notifications][global-error]
ResizeObserver loop completed with undelivered notifications.
rendererWebContentsId=1
rendererWindowAppearance=primary
rendererWindowFocused=true
rendererWindowVisible=true

At 2026-09-14T14:01:03Z, App Server calls for this active task, including thread/queue/add and thread/queue/list, returned with errorCode=null and targetDestroyed=false for both the primary renderer and another web contents instance. A later chatgpt_pubsub_transport_closed warning was also logged, although it is not clear whether that event was causal.

No raw logs, prompts, task identifiers, account identifiers, recording names, or local filesystem paths are included here because they may contain private data.

Expected behavior

When a turn completes and is persisted, the Mac desktop window should leave the Thinking state and render the completed responses. Switching between iPhone remote access and the Mac desktop app should not leave the primary renderer permanently stale. If the live subscription is lost, the desktop app should reconnect automatically or display an explicit recovery action.

This looks closely related to the renderer and task-continuation behavior reported here, with an additional cross-device confirmation that the backend task and stored responses remained healthy. It may also be related to #43151.

markfxs avatar Sep 14 '26 14:09 markfxs

I encountered matching symptoms on November 15, 2026: during active work, the main window suddenly became black with only the OpenAI logo. File > New Window restored a usable interface. This happened twice that morning.

Environment: MacBook Pro M1, macOS 27.2.1 (26B131), ChatGPT/Codex Desktop 26.1111.21308, build 27194, bundle ID com.openai.codex.

Read-only local diagnostics show the following timeline. All timestamps below are UTC, November 15:

  • 10:39:33.608 and 10:39:39.577: primary renderer logged ResizeObserver loop completed with undelivered notifications.
  • 10:41:55.971, immediately before the observed failure around 10:42: Failed to broadcast query cache invalidation with Peer closed MessagePort connection.
  • 10:42:20.019 and 10:42:53.137: Conversation state not found.
  • 10:43:15.558: a new primary window became ready; 10:43:19.057: app routes mounted after 3655ms.

Backend progress events continued between 10:41:58 and 10:43:11, including activity from conversations already running before the failure. This supports a window/state synchronization problem, although it does not establish the root cause.

Earlier that morning, the same MessagePort error appeared at 05:27:39.237, followed by recurring connection failures. There were also 70 Conversation state not found errors between 08:53:20 and 09:27:22.

Possibly related to #60634: the 09:28 launch created two primary windows, but only the second had logged successful UI initialization. Whether this contributed to the later logo-screen failure is unknown.

No matching ChatGPT/Codex crash report or explicit renderer OOM signature was found in the accessible diagnostics. macOS unified logs were inaccessible. No private paths, project names, conversation identifiers, or raw logs are included.

0x1337ff avatar Nov 15 '26 11:11 0x1337ff

I'm seeing a similar issue on Intel macOS. Several open Codex windows go black and stay on the OpenAI logo while their tasks keep running. File → New Window opens a working window without restarting the app. The original windows stay stuck, so I have to find and reopen each chat manually.

This happened on an Intel iMac (iMac20,2, 64 GB RAM), macOS 26.6.2 (25G83), and ChatGPT/Codex Desktop 26.1111.21308 (build 27194).

  • 2026-11-17 at 02:39:19 UTC
  • 2026-11-18 at 01:46:01 UTC

In both incidents, multiple windows switched to authLoading=true and the desktop log recorded Peer closed MessagePort connection. On the second occurrence, an affected window reached chatgpt_pubsub_reconnect_exhausted. A newly opened window authenticated and connected in the same app process.

I haven't found reliable steps to trigger this. Please check whether this is related to #37550 and investigate why the original windows stay on the logo after a new window can connect. Each existing window should recover its original chat and show the current task progress.

RedMamont1 avatar Nov 18 '26 02:11 RedMamont1

I hit the same gray OpenAI-logo screen repeatedly on macOS on November 19, 2026. Around six or more interruptions overnight. The last captured occurrence was at 06:11:15 CST (12:11:15 UTC).

  • ChatGPT/Codex desktop 26.1111.71704, build 29030 (bundled Codex 0.169.1). macOS 27.2.1, build 26B131, Apple silicon.
  • The primary renderer logged 93 instances of ResizeObserver loop completed with undelivered notifications during the affected launch, last at 06:09:58. Four MCP sandbox RPC timed out entries appeared before the screenshot. Two earlier launches also showed both signatures. These are correlations.
  • The app continued receiving reasoning updates through the screenshot timestamp and afterward. Desktop logs record app-server shutdown at 06:11:54 and a fresh launch at 06:12:06. I found no matching native crash report, Crashpad dump, or OS memory kill for that event.
  • In the affected launch, 397 completed thread/turns/list requests took at most 303 ms and reported at most 1 ms of queue wait. The longest completed thread/resume was about 3.1 s. The completed history calls show a different timing pattern from the previously reported multi-second queue congestion.
  • The updater installed build 29030 at about 04:08 CST that morning and the symptom occurred on that build. The exact interaction that triggers the gray screen is still unknown.

Could the desktop team investigate why the primary window can get stuck on the loading screen while app-server updates are still arriving, and whether the renderer can recover or open a replacement window without disrupting active work? I can provide scoped diagnostic excerpts privately if needed.

samuelgoff avatar Nov 19 '26 12:11 samuelgoff

Follow-up: recurring gray screen on macOS build 29030

November 19, 2026. Times below are CST (UTC−06:00). ChatGPT/Codex Desktop production version 26.1111.71704, build 29030, with bundled Codex CLI 0.169.1. macOS 27.2.1, build 26B131, Apple silicon. The configured desktop updater reported up_to_date on this build.

What failed

The primary window showed the OpenAI logo and no chat UI at 06:28:52. The main desktop process and app-server were still running. App-server reasoning updates arrived at 06:28:52 and continued until shutdown began at 06:29:10. macOS launchd recorded a clean main-process exit at 06:29:15.384 and a new launch at 06:29:21.478.

Four separate desktop processes recorded the same sequence. Several chat views deactivated together. Between 1 and 2 ms after the last deactivation, the desktop tools bridge rejected one or more tools/call frames with RangeError: RPC frame exceeds the 536870912-byte native serialization budget. The primary renderer then reported Error: Peer closed MessagePort connection.

Desktop PID First frame rejection Port error
78618 05:12:42.497 05:12:43.251
1286 05:58:51.663 05:58:52.228
72624 06:10:07.929 06:10:08.389
21306 06:28:43.313 06:28:44.064

During the 06:28 incident, three pending wait_threads calls later logged successful renderer-side responses. All three visualization sandbox teardowns and a failed visualization snapshot followed the port error. The available logs omit the identities and sizes of the rejected frames beyond the method and threshold. Those successful wait calls cannot be attributed as the rejected payloads.

At 06:34:12.932, after relaunch, multiple chat views deactivated together again. The primary renderer reported a closed port at 06:34:13.387 and a failed visualization snapshot at 06:34:15.768. The desktop process and main renderer PID were still running at 06:34:25. No frame-budget warning was recorded near this later sequence. This was observed in logs only, without a new screenshot.

What the evidence supports

The visible failure is in the desktop window and its connections. The initiating trigger remains unknown. The timestamp ordering and later recurrence make the oversized frame a diagnostic lead, with insufficient evidence to call it the trigger. The installed desktop bundle confirms that the sender checks the frame budget before calling postMessage.

No native crash dump or OS memory kill for the 06:28 incident was found in the checked logs. The 06:29 resource diagnostic records heavy disk writes at the application coalition level and explicitly says Action taken: none. No causal link between those writes and the gray screen was established.

Recovery and engineering follow-up

OpenAI Codex issue #37550 documents the same gray-screen symptom and reports that File → New Window can reconnect to ongoing work without quitting the app. In-app browser tabs may stay tied to the original window.

Could the desktop team investigate and fix this recurring gray screen? Please capture why the primary chat views deactivate together and why the window remains on the loading screen while app-server updates continue. Correlate bridge calls with method and encoded byte estimates, ensure oversized results fail only their own requests, and verify that renderer recovery restores the chat UI while the app-server continues running. A reproducible interaction and a patched build are still needed.

This report omits raw logs, chat and turn IDs, screenshots, local paths, and account data.

samuelgoff avatar Nov 19 '26 22:11 samuelgoff