openai / openai/codex

[macOS] Codex Desktop sustains 80%+ GPU usage whenever it is the focused foreground app

Open
#41,038 2 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

app bug performance
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 26.820.60940 (build 7119)

What subscription do you have?

ChatGPT Pro ($200/month)

What platform is your computer?

MacBook Air with Apple M4 and 10-core GPU 24 GB unified memory and 512 GB SSD macOS 26.6.2 (25G83)

What issue are you seeing?

Environment

  • MacBook Air with Apple M4 and 10-core GPU
  • 24 GB unified memory and 512 GB SSD
  • macOS 26.6.2 (25G83)
  • Codex Desktop 26.820.60940 (build 7119)
  • Chromium 151.0.7922.170
  • Built-in Retina display
  • External VX2479-4K-HD display at 3840 × 2160, 60 Hz, connected via USB-C in extended desktop mode
  • The Codex window is located on the MacBook’s built-in display, not on the external 4K display
    Issue
    Whenever Codex becomes the focused foreground application, GPU Device, Renderer, and Tiler utilization rapidly rises and remains above 80%. It commonly stays around 80–87% and occasionally approaches 100%.
    If I switch to another application so that Codex loses focus, GPU utilization quickly falls below 10%, usually to around 0–6%. This happens even when the Codex window remains fully visible and is not minimized.
    Refocusing Codex immediately causes GPU utilization to rise back to approximately 80% or higher.
    The trigger therefore appears to be the application’s foreground/focus state, rather than simple window visibility.
    Steps to reproduce
  1. Launch Codex Desktop.
  2. Open any conversation, or remain on a static settings page.
  3. Click Codex so that it becomes the active foreground application.
  4. Observe GPU utilization rapidly rise and remain above 80%.
  5. Click another application while leaving the Codex window fully visible.
  6. Observe GPU utilization rapidly fall below 10%.
  7. Refocus Codex and observe the GPU spike immediately return.
    Tests already performed
    The issue is consistently reproducible:
  • Whether Codex has active tasks or no tasks running
  • On a normal conversation page or a static settings page
  • Whether other applications are idle or generating additional system load
  • While the Codex window remains visible and only application focus is changed
  • After fully quitting and relaunching Codex
  • After restarting macOS
    One set of continuous measurements showed:
  • Codex focused and visible: 30-second average GPU utilization of approximately 85%, with a range of 78–100%
  • Codex unfocused or minimized: 25-second average of approximately 3%, with a range of 0–6%
    Background Codex tasks continue running in both states. Agent computation or background task activity therefore does not explain the GPU change controlled directly by application focus.
    Preliminary hypothesis
    This may be caused by a foreground-only UI repaint or compositing loop in Codex Desktop. Possible causes include:
  • An animation, progress indicator, or UI layer continuously invalidating the frame while Codex is focused
  • Chromium/Electron compositor, display-link, or animation timers continuing to render even when the UI is static
  • Chromium background throttling reducing these callbacks only after Codex loses focus, which would explain the immediate GPU reduction
    This is only an inference from the observed behavior and not a confirmed root cause.
    The external display may amplify the rendering cost, but in this setup the decisive trigger is whether Codex has foreground focus. The Codex window itself is located on the built-in display.
    Impact
    The sustained GPU load causes:
  • Increased temperature and power consumption
  • Reduced battery life
  • Video playback stuttering or dropped frames on the external display
  • High graphics utilization even when Codex is displaying a static page
    This does not appear to be a limitation of the M4 GPU. A static conversation or settings page should not consume most of the available GPU simply because the application is focused.
What steps can reproduce the bug?

Feedback ID: 01a03e0a-7561-7870-9f12-a86e9cc4f95b

What is the expected behavior?

When displaying a static conversation or settings page, Codex GPU utilization should return close to idle. Merely making Codex the active application should not increase GPU utilization from single digits to more than 80%.
Please investigate the foreground rendering, frame invalidation, animation timer, and Chromium compositor paths. Codex should stop continuously refreshing—or apply an appropriate frame-rate limit—when there are no meaningful visual changes.

Additional information

No response

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

Reproduce the issue using the listed macOS/Codex setup and focus/unfocus steps, measuring GPU usage in both states. Then trace the foreground rendering, frame invalidation, animation-timer, and Chromium compositor paths; done means a static conversation or settings page remains near idle GPU usage while Codex is focused without affecting active tasks.

Written by the indexing model from the issue text.

Assessment

Tech stack
macos, rust
Domain
desktop, performance
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.