[Bug][Chrome Extension] Infinite UI flickering loop when moving browser window across monitors / displays
What version of the Codex App are you using (From “About Codex” dialog)?
26.818.41509 (Chrome extension: 1.2.27268.51612_0 / ID: hehggadaopoacecdllhhajmbjkdcmajg)
What subscription do you have?
Plus / Pro
What platform is your computer?
Darwin 25.5.0 arm64 arm (macOS, Multi-monitor setup)
What issue are you seeing?
When using the official ChatGPT / Codex Chrome extension on a multi-monitor setup:
- After having an active conversation with the extension on Display 1, dragging the Chrome window from Display 1 to Display 2 unmounts/closes the extension popup.
- When re-opening the extension on Display 2, the extension UI enters a rapid state oscillation / reconnection storm and continuously flickers (~5-10 Hz).
- The only way to stop the flickering is to click the "New Chat" button, which breaks the loop but causes all previous conversation context in that tab to be lost.
What steps can reproduce the bug?
- Open Google Chrome on Monitor 1 and launch the ChatGPT / Codex browser extension.
- Send a prompt to read/analyze the current page and get a response.
- Drag the Chrome window from Monitor 1 to Monitor 2 (or tear the tab off into Monitor 2).
- The extension UI automatically closes due to window detachment.
- Re-open the extension on Monitor 2.
- Observe that the extension interface keeps flickering endlessly.
What is the expected behavior?
The extension should detect the window move cleanly, re-attach to the new windowId/tabId, and preserve or recover the active conversation session without entering an infinite retry/reconnection loop.
Additional information
Root Cause Analysis:
Moving a window across monitors triggers Chromium's tabs.onDetached / tabs.onAttached events and assigns a new windowId. The local Native Messaging Host (com.openai.codexextension) still retains the stale windowId/tabId session claim from Monitor 1. When the newly opened extension instance attempts to resume the session with the new windowId, the Native Host rejects the mismatch, triggering client-side auto-reconnect logic repeatedly every few hundred milliseconds.