Codex Desktop crashes conversation UI after repeated desktop notification errors

Open 💬 1 comment Opened Jul 25, 2026 by nikolaSour

Description

Codex Desktop’s conversation UI became unusable while an agent task was running. The task appeared to crash or disappear, but macOS did not generate a native crash report.

The desktop log suggests that the renderer entered an inconsistent conversation/turn state. Repeated errors from the desktop notification handler were followed by a React error boundary in the local conversation page.

Observed behavior

  1. The desktop notification handler repeatedly threw unhandled errors:
[desktop-notifications][unhandled-rejection]
TypeError: Cannot read properties of undefined (reading 'id')
  1. The conversation page then triggered an error boundary:
error boundary
errorMessage="Cannot read properties of undefined (reading 'type')"
errorName=Error
name=AppRoutes
  1. Additional state-consistency errors appeared:
Item not found in turn state itemId=<redacted>
Received turn/completed for unknown conversation
conversationId=<redacted>
  1. The notification error continued at high frequency as both unhandled-rejection and global-error.

There was also an unrelated or concurrent remote connection failure:

SSH: codex path probe timed out after 60000ms

It is unclear whether the remote connection failure contributed to the UI state corruption.

Expected behavior

  • A malformed or missing notification item should not crash the conversation UI.
  • Receiving an event for an unknown conversation or missing turn item should be handled gracefully.
  • The active task should remain visible and recoverable after a renderer-side error.
  • Notification failures should not repeatedly trigger global errors.

Actual behavior

  • The active task appeared to crash or become disconnected from the UI.
  • The conversation page entered an error boundary.
  • Turn completion events could no longer be matched to the conversation state.
  • Repeated notification errors continued after the initial failure.

Impact

  • Work in the repository remained on disk and was not lost.
  • The agent task could not be reliably continued from the affected UI state.
  • Restarting or reopening Codex was required to recover the interface.

Native crash report

No Codex .ips crash report was generated under macOS Diagnostic Reports. This appears to be a renderer/application-state failure rather than a native process crash.

Possible cause

The logs suggest a race or stale-state issue involving:

  • desktop notification entries with a missing object or missing id;
  • a turn item being removed before a related event was processed;
  • completion events arriving after the conversation was removed or replaced in renderer state;
  • possible reconnection/state-rehydration interaction.

The first clearly visible failure was the repeated notification handler exception, followed by the conversation route error boundary.

Suggested safeguards

  • Null-check notification objects before accessing id.
  • Ignore or reconcile events referring to missing turn items.
  • Handle completion events for unknown conversations without throwing.
  • Prevent notification exceptions from propagating into the global renderer error handler.
  • Add diagnostic logging for the state transition that removes a conversation or turn item.
  • Deduplicate or rate-limit repeated notification-handler errors.

Environment

Platform: macOS
Application: Codex Desktop 26.721.41059 build 5848
Date: 2026-07-25
Task type: Local workspace agent task

Reproduction

No reliable minimal reproduction is currently known. The issue occurred while an agent task was running and the application was also attempting to reconnect to a configured remote environment.

View original on GitHub ↗

1 Comment

dimasyankauskas · 1 month ago

macOS corroboration: registry repair isolates a separate renderer-state failure

Corroborating this on macOS with ChatGPT Desktop 26.721.41059 (build 5848).

I first repaired the malformed process-notification registry described in #29593 using a reversible quarantine:

  • malformed registry size: 2,621,440 bytes
  • parser failure: unterminated string at EOF
  • corrupted file moved to an owner-only local backup
  • ChatGPT recreated the live registry as valid JSON

That produced a useful controlled separation. In a bounded current-launch window from 23:24:56 through 23:57:29 PDT:

  • 0 unterminated/unfinished JSON failures
  • 0 notification-record loadRecords failures
  • 5,781 Conversation state not found events
  • 2,326 Received item/turn started/completed for unknown conversation events

The conversation-state failures were distributed across all three renderer appearances observed in the log:

| Renderer appearance | Conversation state not found |
|---|---:|
| Primary | 1,607 |
| Global Dictation | 2,557 |
| Avatar Overlay | 1,617 |

Additional privacy-safe checks:

  • 20 distinct conversation identifiers appeared in the affected event set
  • 11 corresponded to visible, unarchived rows in the local thread database
  • the thread database passed PRAGMA quick_check
  • the current primary conversation remained usable during capture

This means the malformed registry was a real and separately recoverable defect, but it does not explain the remaining renderer-state failures. The current evidence is consistent with app-server events reaching renderer-local conversation stores before the corresponding state is hydrated or subscribed, or reaching secondary renderers that do not own that conversation. This is an inference from event ordering and renderer attribution, not a claim about the internal root cause.

Potential diagnostic boundary:

  • event ownership and subscription filtering between app-server and renderer windows
  • hydration ordering during thread/resume, rollback, and streamed item/turn events
  • handling of valid background or side conversations in Primary, Global Dictation, and Avatar Overlay renderers
  • graceful ignore/reconciliation when a renderer receives an event for state it does not hold
  • deduplication or rate limiting for repeated missing-state diagnostics

Privacy boundary: no raw logs, conversation/thread IDs, prompts, titles, task names, repositories, local paths, account details, or client information are included or attached.