Pet overlay forces macOS to auto-switch back to Codex's Space when navigating to another Space
What platform is your computer?
macOS (Darwin 25.5.0)
What issue are you seeing?
After waking the Codex pet, navigating to any other macOS Space causes the system to immediately auto-switch back to the Space where Codex's main window lives. Every attempt to focus another Space yanks me back to Codex within ~1–2 seconds, making multi-Space workflow impractical while the pet is awake.
Observations from a screen recording of the repro (attached as a comment):
- The pet sprite is visible on every Space, consistent with
canJoinAllSpaces-style window behavior. - Switching to a Space that contains only a Finder window still triggers the auto-switch back.
- The trip back happens fast enough that it interrupts the Mission Control transition animation.
Hypothesis: the pet overlay is not actually a fully non-activating panel, so when it animates / gains focus / receives input on the new Space, it activates the Codex app process. macOS then applies the "When switching to an application, switch to a Space with open windows for the application" rule (System Settings → Desktop & Dock → Mission Control) and slides back to Codex's home Space.
This may share a root cause with #20706, which logs NSWindow does not support nonactivating panel styleMask 0x80 — suggesting the intended non-activating mask is not being applied on macOS. See also #20831 for an unrelated but pet-overlay-adjacent issue.
What steps can reproduce the bug?
- On a multi-Space macOS setup (e.g. 6 Spaces), assign Codex's main window to one Space.
- Wake the pet with
/pet. - Switch to a different Space that does not contain Codex's main window — via Mission Control, swipe, or Ctrl+arrows. A Space with only a Finder window is enough.
- Within ~1–2 seconds, macOS automatically slides back to Codex's home Space.
What is the expected behavior?
Switching to another Space should stay on that Space. The pet overlay should never implicitly reactivate the Codex app or trigger Spaces switching when the user navigates away.
Additional information
- macOS Spaces: 6 Spaces, Codex pinned to one of them; pet overlay floats on all Spaces.
- Likely-related setting: System Settings → Desktop & Dock → Mission Control → "When switching to an application, switch to a Space with open windows for the application". Disabling this may be a workaround, but the overlay should not be triggering app activation in the first place.
- Screen recording reproducing the bug will be attached as a comment.
2 Comments
Attached: screen recording of repro #
https://github.com/user-attachments/assets/a3e1e0fe-4631-4200-bcb8-028ef08320f7
I can reproduce this on a current Codex Desktop build, and captured the macOS application/Space activation sequence. This provides direct evidence that the pet overlay causes Codex to reactivate.
Environment
26.715.619435628com.openai.codex26.5.2 (25F84)1.3.2-main-+ea7dc5c00Reproduction
Direct trackpad navigation to the Ghostty Space works normally. The failure occurs when switching to Ghostty through Cmd-Tab.
Captured activation sequence
A standalone AppKit probe observed
NSWorkspaceactivation notifications and sampled the managed Space ID every 25 ms:Codex reactivated approximately 290 ms after Ghostty became active. The Space switched back only after
com.openai.codexbecame frontmost.The source application was Chrome, but Codex—not Chrome—became active after Ghostty. This rules out macOS merely restoring the previous/source application.
Controls
This isolates the behavior to the avatar/pet overlay rather than the Codex main window, Ghostty, or a third-party hotkey/window manager.
Packaged component observation
The installed app contains:
Its Objective-C symbols include:
That is consistent with the issue hypothesis: an avatar overlay
NSPanelor pending activation window is becoming key/active during the cross-Space transition, causingcom.openai.codexto reactivate and Mission Control to return to Codex's home Space.Workaround
Hide the Codex pet. The main Codex window can remain visible; it does not need to be minimized or quit.