Windows: system-wide mouse cursor flicker after turn completes; fixed only by restarting dwm.exe

Open
#34,340 4 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
45/100
Issue type
Bug
Clarity
Needs clarification
Activity status
Active
Tech stack
rust

Research direction

Start by reproducing the Windows Desktop turn-complete-to-idle sequence and compare cursor behavior during and after a turn. Inspect the pointer, layered-window, composition, and mouse-passthrough cleanup path mentioned in the report; done means the cursor does not flicker after idle or after the app exits, without restarting DWM.

Written by the indexing model from the issue text.

Description

app bug windows-os
Summary

On Windows, after a Codex Desktop turn finishes (idle), the mouse cursor starts flickering continuously across the entire screen. The flicker is not present while the turn is in progress. It survives full app exit (no ChatGPT/codex processes remaining). Restarting dwm.exe fixes it immediately; rebooting Windows also fixes it. Reloading system cursors via SPI_SETCURSORS does not fix it.

Environment
  • OS: Windows (build: run winver and fill in if needed)
  • Codex Desktop: 26.715.52143 (Microsoft Store / MSIX)
  • Platform: Windows x64
Already ruled out (please do not close as environment noise)
  • Custom mouse cursor theme / pointer style
  • Background software
  • GPU / GPU driver reinstall
  • External injectors (e.g. Codex++ / skin injectors)
  • Built-in pet / avatar UI feature
  • Codex Computer Use
Steps to reproduce
  1. Open Codex Desktop on Windows.
  2. Send any message and wait until the turn fully completes (agent becomes idle).
  3. Move the mouse anywhere on the screen (including empty desktop).
Expected

Cursor remains normal after turn completion.

Actual
Condition Result
During turn No flicker
After turn completes (idle) Continuous system-wide cursor flicker
Start a new turn Flicker temporarily stops during the turn
That turn ends Flicker returns
Fully quit Codex (no ChatGPT/codex processes in Task Manager) Flicker continues
SystemParametersInfo(SPI_SETCURSORS) / restore system cursors No effect
Stop-Process -Name dwm -Force (DWM restarts) Flicker stops immediately
Reboot Windows Flicker stops
Inference

The post-turn idle path corrupts DWM cursor composition / hardware cursor state.
The bad state:

  • outlives the Codex process
  • is not fixed by reloading the cursor scheme from the registry
  • is cleared only by recycling DWM (or rebooting Windows)
Workaround
Stop-Process -Name dwm -Force
Why this report is actionable
  • Clear phase lock: only after turn idle, not during streaming
  • Clear layer lock: DWM session state (process exit does not help; DWM restart does)
  • Controlled exclusions listed above so it is not mistaken for cursor pack / driver / injector issues
  • Optional: 10s screen recording starting at turn completion helps a lot
Request

Please investigate the turn-complete → idle path on Windows Desktop (pointer / layered window / composition / mouse passthrough cleanup) for anything that can leave DWM’s cursor composition in a bad state after the app exits.

Dominant language
Rust
Stars
125k
Forks
19.5k
Avg merge
1m
Merged PRs (30d)
1k

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.

More from openai/codex

All issues in openai/codex

Similar issues

More Rust issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.