Codex App composer cannot be focused after opening from Codex Pet notification bubble on macOS
What version of the Codex App are you using (From “About Codex” dialog)?
26.623.61825, build 4548
What subscription do you have?
official pro 20x
What platform is your computer?
macOS 26.5 (25F71), Apple Silicon arm64uname -mprs: Darwin 25.5.0 arm64 arm
What issue are you seeing?
After opening or bringing Codex to the foreground from the Codex Pet / avatar overlay, the main Codex window appears, but the composer cannot reliably be focused with mouse clicks. The click target is the composer editor area, but the caret/focused editor state does not appear. Repeated clicks may not recover it; switching app/window focus several times can eventually recover.
The issue is much easier to reproduce when clicking a Codex Pet notification bubble. Opening Codex from the Dock does not reproduce the issue in the same environment.
This looks like an Electron/macOS window activation issue rather than a normal editor click handler failure: the main window is visible, but its renderer/WebContents does not reliably regain text input focus after the avatar overlay opens it.
What steps can reproduce the bug?
- On macOS, enable/use the Codex Pet/avatar overlay.
- Let the pet show a notification bubble for a Codex thread/task.
- Click the notification bubble to open the related thread in the main Codex window.
- Click the composer input area.
- Observe that the composer often does not focus and no caret appears.
- Compare with opening Codex from the Dock icon: the composer can be focused normally.
What is the expected behavior?
When the Codex Pet body or notification bubble opens the main Codex window, the app should become the active macOS app and the main window's WebContents/composer should be able to accept text input immediately.
Additional information
The problem appears related to two avatar overlay IPC paths:
- Pet body click sends
open-current-main-window. - Notification bubble click sends
open-in-main-windowwith apath.
In recent builds, strong focus handling appears to exist only for the open-current-main-window path when stealFocus === true. The ordinary open-in-main-window path still appears to restore/show/focus the BrowserWindow without also forcing app activation and WebContents focus.
A local patch that made the ordinary main-window open path do the following resolved the symptom locally:
- restore the BrowserWindow if minimized
- call
app.focus({ steal: true })on macOS - show the BrowserWindow
- call
BrowserWindow.focus() - call
BrowserWindow.webContents.focus()
It would be helpful if both avatar overlay open paths, especially notification bubble clicks, used the same strong activation sequence on macOS.
7 Comments
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action
I can reproduce a very similar issue on Codex macOS 26.623.101652.
When Codex is in the background, clicking the pet/avatar overlay brings Codex to the foreground, but then clicking the composer/input box can freeze or fail to focus.
Clicking the pet/avatar overlay a second time immediately restores the input box.
This happens with all pets I tested, so it does not appear to be caused by a specific custom pet asset.
I am seeing what looks like the same focus/activation bug on a newer Codex build, with a slightly broader symptom than only the composer.
Environment:
26.623.1016524674149.0.7827.19726.5.1build25F80Observed behavior:
Recent unified log evidence from a reproduction around
2026-07-06 11:32:12-11:33:12 CST:There are also
TextInputUI/CursorUIViewServiceactivations around the same period, which seems consistent with the app re-establishing input focus after the window ordering churn.So this appears to affect the desktop pet / overlay path generally: after the pet brings the main window forward, the app/window/panel activation sequence can leave the visible main UI temporarily unable to receive mouse input until focus is cycled or enough clicks have occurred.
Still reproducible on Codex App 26.707.31428, build 5059, on macOS 26.5.1 (25F80), Apple Silicon arm64. Opening Codex from the desktop pet brings up the main window, but the composer does not accept keyboard input. Clicking the Codex icon in the macOS Dock restores input immediately. This matches the original report and confirms the bug persists in the newer app build.
I can confirm that this is still reproducible on the current macOS build available on this machine:
26.707.61608CFBundleVersion:520042.1.0150.0.7871.115com.openai.codexThe failure is specific to the user-initiated Pet notification path: clicking a Pet message opens the expected thread and makes the main window visible, but the composer is not a usable text input target until application focus is cycled or the Dock icon is clicked.
I performed a read-only inspection of the packaged
app.asarfrom this signed build. The current main-process bundle still appears to handle the two paths differently:open-current-main-windowwithstealFocus === trueis routed through the stronger primary-window activation path.open-in-main-windowpath restores the window if minimized, then callsshow()andfocus(), but does not appear to activate the macOS application withapp.focus({ steal: true })or explicitly focuswebContents.That matches the observed behavior: the NSWindow is ordered/displayed, but the application/key-window/text-input handoff is incomplete.
Suggested fix direction:
open-in-main-windowaction through the same shared strong-activation helper used by the explicitopen-current-main-window + stealFocuspath, or make the shared helper perform the following for this user-initiated action on macOS:app.focus({ steal: true })window.show()window.focus()window.webContents.focus()open-in-main-windowfrom the avatar notification invokes application activation and focuses the target window/WebContents.I checked the current public
openai/codexmain branch as well. The Electron/macOS desktop source that owns these IPC handlers does not appear to be present there, so I cannot prepare a meaningful external PR against the public repository. If that source is mirrored or contributions are accepted elsewhere, I would be happy to turn this into a focused patch and regression test.Follow-up after testing external workaround options on the same machine and app build:
I do not recommend publishing or installing an external helper for this issue. The user-side approaches I tested were not reliable across displays/Spaces.
Environment:
Observed results:
External mechanisms tested:
In the final Accessibility test, the helper observed a non-Codex application become active and then observed Codex become active again, but the composer still had no caret and could not accept Chinese input until a physical manual app switch was performed.
Because the workaround required broad Accessibility permission, caused visible focus switching, and still failed on the second display, I did not publish the proposed helper repository. This evidence reinforces that the reliable fix needs to live inside the desktop app: the Pet notification path should use the same strong macOS activation path as the explicit focus path, including app.focus({ steal: true }), BrowserWindow.focus(), webContents.focus(), and composer refocus after an active-Space transition.
Still reproducible on the latest build available on this machine, with an additional deterministic activation path.
Environment
26.707.72221530726.5 (25F71)Reproduction
The primary composer cannot obtain keyboard focus and no text can be entered. This path reproduces consistently while the Pet is awake.
Desktop log evidence
At
2026-07-15T01:32:59.704Z, the app reports:Subsequent events continue to report the Pet overlay as focused while the visible primary window remains unfocused. Focus is restored after the Pet is tucked away.
This suggests that macOS app reactivation can restore key focus to
avatarOverlayinstead of the primary window/composer. In addition to strengthening the Pet notification open path, it may be worth handlingdid-become-active: if the Pet has no active keyboard interaction, restore the last active primary window and its WebContents/composer focus. Similarly, when Pet keyboard interaction is disabled while the overlay owns focus, focus should be returned to the primary window.Workaround
Tuck away the Pet or restart the app.