openai / openai/codex

[Windows] Floating pet becomes click-through: WS_EX_LAYERED breaks hit testing; workaround and A/B evidence

Open
#43,200 6 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

app bug pets windows-os
Dominant language
Rust
Stars
125k
Forks
19.4k
PR merge metrics
PR metrics pending

Description

What version of the Codex App are you using (From “About Codex” dialog)?

Codex Desktop package: 26.901.6511.0

What subscription do you have?

Plus

What platform is your computer?

Windows 11

What issue are you seeing?

On Windows, the Codex floating pet can remain fully visible while becoming click-through. Physical mouse clicks and drags are delivered to the desktop or window underneath instead of to the pet, so the pet cannot be clicked or moved.

This affects both a custom V2 pet and built-in Codex pets. The failure is correlated with WS_EX_LAYERED remaining enabled on the pet HWND: removing that one extended-window style immediately restores clicking and dragging; restoring it makes the pet click-through again.

What steps can reproduce the bug?
  1. Run Codex Desktop on Windows and select either a built-in pet or a custom V2 pet.
  2. Wake the floating pet and leave it visible.
  3. When the issue occurs, click or drag the visible pet.
  4. The click is delivered to the desktop or window underneath; the pet receives no pointer-down event and cannot be dragged.

Native reproduction / confirmation:

  • Inspect the visible Codex pet HWND at a point over the pet.
  • With WS_EX_LAYERED present (GWL_EXSTYLE 0x002800A8), WindowFromPoint resolves to the underlying window.
  • Remove only WS_EX_LAYERED (0x00080000), refresh the frame, and retry: WindowFromPoint resolves to the pet HWND and clicking + dragging work immediately.
  • Restore WS_EX_LAYERED: the pointer again resolves to the underlying window.

This was reproduced with both a custom V2 pet and an in-app built-in pet.

What is the expected behavior?

The visible floating pet should receive pointer input. A left-click should trigger the pet interaction, and click-and-drag should move the pet. Transparent areas outside the pet should continue to let clicks reach the underlying desktop or window.

Additional information

Environment:

  • Windows 11
  • Codex Desktop package: 26.901.6511.0
  • App package version: 26.901.51231
  • Electron dependency declared by the app: 42.3.0

Native A/B/A evidence from the same visible pet HWND:

  • WS_EX_LAYERED removed: GWL_EXSTYLE 0x002000A8; Windows targeted the pet HWND; clicking and dragging worked.
  • WS_EX_LAYERED restored: GWL_EXSTYLE 0x002800A8; Windows targeted the underlying HWND; the pet was click-through.
  • WS_EX_LAYERED removed again: Windows targeted the pet HWND again.

Temporary workaround: remove only WS_EX_LAYERED (0x00080000) from the visible pet window and refresh its non-client frame. This restores interaction, but it is not a complete product fix because it may make the transparent rectangular bounds capture input more broadly than the visible pet pixels.

Likely area to investigate: the avatar overlay transitions between setIgnoreMouseEvents, input-shape updates, and presentation opacity/fade state. A layered state appears to persist after the overlay should be interactive.

Related issue: #42255

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Trace the avatar overlay transitions between setIgnoreMouseEvents, input-shape updates, and presentation opacity/fade state, using the Windows pet HWND behavior described in the report as the reproduction check. The issue is resolved when the visible pet receives clicks and drags while transparent areas still pass input to the underlying window.

Written by the indexing model from the issue text.

Assessment

Tech stack
electron
Domain
desktop, operating-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
52/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.