Codex desktop pet window is not always on top after wake on Windows
What happened?
On Windows 11 Enterprise LTSC 2024, after using Wake pet / the pet command to show the Codex desktop pet, the pet appears but can be covered by normal application windows such as Chrome, Feishu, and the Codex main window.
Expected behavior: the pet overlay should remain always-on-top by default, while the Codex main window should not become always-on-top.
Observed behavior: the pet overlay window is not marked as topmost, so other windows can cover it.
Environment
- OS: Windows 11 Enterprise LTSC 2024, 64-bit, build 26100
- Codex desktop package:
OpenAI.Codex_26.429.8261.0_x64__2p2nqsd0c76g0
Note: a local PowerShell Get-ComputerInfo readout displayed WindowsProductName : Windows 10 Enterprise LTSC 2024, but build 26100 corresponds to the Windows 11 24H2 / LTSC 2024 line. The affected machine should be treated as Windows 11 Enterprise LTSC 2024.
Scope update
- Reproduces on Windows 11.
- Does not reproduce on Windows 10.
- Does not reproduce on macOS.
So this appears to be specific to the Windows 11 desktop behavior/window flags path rather than a general pet overlay issue across all platforms.
Reproduction steps
- Open Codex desktop on Windows 11.
- Go to Settings > Appearance > Pet.
- Select the default Codex pet.
- Click Wake pet / use the pet wake command.
- Move or focus another normal application window over the pet.
Actual result
The pet window is covered by the other application window.
Additional local inspection
Using the Windows API to inspect visible top-level windows showed the pet overlay as a separate Codex window, roughly 356x320, but its extended window style did not include WS_EX_TOPMOST (TopMost=False). The Codex main window and pet overlay are both titled Codex, but the main window is much larger; only the pet overlay should be topmost.
Expected fix
When the pet overlay is created or woken, set the pet overlay window to always-on-top / topmost on Windows 11, without applying topmost to the main Codex window.
2 Comments
I can reproduce a related / more specific variant on Windows with Windows Photos.
Environment:
custom:bit-hatch-2dBehavior observed:
Important detail:
The pet is still considered visible internally:
electron-avatar-overlay-openremainstrue.Expected:
After Windows Photos is closed, the pet/avatar overlay should recover its frontmost / always-on-top behavior.
Actual:
The pet remains alive and enabled, but stays behind other windows until manually hidden and shown again.
This seems consistent with the overlay losing or failing to maintain its topmost behavior on Windows, and Codex not re-applying the topmost state after another app takes focus.
I’m seeing what appears to be the same topmost issue on Windows, with an additional lifecycle clue:
This suggests the topmost / always-on-top state may be applied successfully during the restore or reopen path, but not reliably during the initial show path, or it may be applied too early before the pet window is fully ready.