Renderer repeatedly crashes to "Oops, an error has occurred" — unhandled CancelledError from app-server-manager-signals query invalidation
Summary
The desktop app (renderer) repeatedly throws to its error-boundary fallback screen — "Oops, an error has occurred" with Update Codex / Try again buttons — at high frequency (as often as once per minute). The backend app-server and the running agent threads are not interrupted (work continues), but the error screen hijacks the UI and breaks the workflow each time it appears. Update Codex is a no-op (already on the latest version). Try again remounts the renderer and returns to the default screen, but the error recurs shortly after.
Root cause (from logs)
The trigger is an unhandled promise rejection (CancelledError) in the renderer, raised from a query invalidation/refetch chain in app-server-manager-signals. The cancel thrown during refetchQueries isn't caught, bubbles up as an unhandled rejection, and trips the React error boundary.
Stack (from ~/Library/Logs/com.openai.codex/.../codex-desktop-*.log):
error [electron-message-handler] [desktop-notifications][unhandled-rejection] Error: CancelledError
at Object.o [as cancel] (app://-/assets/app-scope-*.js:1:5906)
at _e.cancel (app://-/assets/app-scope-*.js:1:8058)
at _e.fetch (app://-/assets/app-scope-*.js:1:9712)
at Array.map (<anonymous>)
at Object.batch (app://-/assets/app-scope-*.js:1:4822)
at Ie.refetchQueries (app://-/assets/app-scope-*.js:1:28802)
at Ie.invalidateQueries (app://-/assets/app-scope-*.js:1:28556)
at EO (app://-/assets/app-server-manager-signals-*.js:107:7727)
Frequency in logs: 145 CancelledError occurrences in a single day, with multiple renderer route-remount events (the "Try again"/auto-reload cycle). It looks like rapid app-server signal changes invalidate queries, in-flight fetches get cancelled, and the resulting CancelledError rejections aren't swallowed — so each burst can flip the whole UI to the error boundary.
Likely contributing condition
This surfaced heavily during high-fan-out subagent work (many concurrent threads emitting app-server-manager signals). Rapid invalidate→refetch→cancel cycles under that load appear to multiply the unhandled CancelledError rejections. May be related to broader resource pressure from many subagents, but the UI defect itself is independent: a cancelled query should never crash the renderer.
Expected
A cancelled/superseded query refetch (CancelledError) should be handled silently — it must not propagate as an unhandled rejection or trip the global error boundary. Query cancellations are normal during rapid invalidation and should not surface a full-screen error.
Steps to reproduce
- Run multiple concurrent agent threads (high signal churn from the app-server).
- Observe the renderer flip to "Oops, an error has occurred" at high frequency.
Update Codexdoes nothing (already latest);Try againreloads and the error recurs.
Environment
- Codex.app version 26.616.31447 (build 4133)
- macOS 26.5.1 (Apple Silicon, 64 GB RAM)