Summary
Codex Desktop's bundled Computer Use runtime can leave a ScreenCaptureKit stream running after the Computer Use interaction/session has ended. The stale stream continued producing roughly 55–56 frames per second with no consumer, driving WindowServer to about 50–60% CPU and 59% GPU on macOS.
Fully quitting Codex clears the condition. Closing the target application or ending the visible Computer Use interaction does not.
Environment
- macOS 26.5.2 (25F84), arm64
- Codex Desktop 26.721.41059 (build 5848)
- Bundled Codex CLI
0.146.0-alpha.3.1
- Computer Use runtime 26.721.1000502 (build 1000502)
- One active external display: 2560×1440 at 100 Hz
Reproduction
- Launch Codex Desktop on macOS.
- Use the bundled Computer Use capability to inspect/control another macOS app.
- Finish the interaction and fully quit the target app.
- Stop making Computer Use calls and inspect Activity Monitor using All Processes, sorted by
% GPU.
- Inspect the running Computer Use helpers and recent
replayd / SkyComputerUseService unified logs.
The issue may be easier to reproduce after more than one Codex task/thread has loaded Computer Use. In this reproduction, two SkyComputerUseClient event-stream mcp processes remained connected to one SkyComputerUseService.
Actual behavior
After the target app had fully exited:
- No target-app process remained.
WindowServer was approximately 56.6% CPU and 59.4% GPU.
- Codex's own GPU process was below 1% GPU at the same time.
- One
SkyComputerUseService and two SkyComputerUseClient event-stream mcp processes remained.
replayd still reported an active capture session attributed to the SkyComputerUseService PID.
Representative sanitized log evidence:
FigVideoQueueGMStats: 334 frames enqueued in the last 6 seconds
recent frames: enqueued: 335, displayed: 0, evicted: 335
SCCaptureSession setupHealthMonitor: screenframeCount=279
fetchShareableContent... currentProcessID=<SkyComputerUseService PID>
The screenframeCount samples were taken five seconds apart, corresponding to roughly 55–56 captured frames per second. Frames continued to be generated even when none were displayed and all were evicted.
Resetting the current node_repl Computer Use client stopped one capture stream, but another stream continued at the same rate. WindowServer remained around 46–49% CPU during a separate 10-second top sample with no UI automation calls being made.
No GPU reset, GPU hang, AGX timeout, GPU fault, or Metal fault appeared in the same one-hour log window.
Expected behavior
When the Computer Use tool call/turn/session ends and there is no active consumer:
- its ScreenCaptureKit stream should stop;
- stale per-thread MCP clients should be disconnected or reaped;
SkyComputerUseService should not continue producing frames that are immediately evicted;
WindowServer GPU usage should return to its normal idle level.
Workaround
Fully quit Codex with Cmd-Q, wait for SkyComputerUseService and SkyComputerUseClient to exit, and reopen Codex.
Suggested fix
- Tie each ScreenCaptureKit stream to an explicit consumer/session lifetime.
- Stop and invalidate the stream when the last consumer disconnects or a turn ends.
- Add an idle guard: if frames are continuously evicted with no displayed/consumed frames, tear down the stream.
- Reap stale
event-stream mcp clients and prevent multiple abandoned clients from keeping capture alive.
- Add a regression test that verifies helper count and active ScreenCaptureKit streams return to baseline after a Computer Use turn ends.
Related issue
Summary
Codex Desktop's bundled Computer Use runtime can leave a ScreenCaptureKit stream running after the Computer Use interaction/session has ended. The stale stream continued producing roughly 55–56 frames per second with no consumer, driving
WindowServerto about 50–60% CPU and 59% GPU on macOS.Fully quitting Codex clears the condition. Closing the target application or ending the visible Computer Use interaction does not.
Environment
0.146.0-alpha.3.1Reproduction
% GPU.replayd/SkyComputerUseServiceunified logs.The issue may be easier to reproduce after more than one Codex task/thread has loaded Computer Use. In this reproduction, two
SkyComputerUseClient event-stream mcpprocesses remained connected to oneSkyComputerUseService.Actual behavior
After the target app had fully exited:
WindowServerwas approximately 56.6% CPU and 59.4% GPU.SkyComputerUseServiceand twoSkyComputerUseClient event-stream mcpprocesses remained.replaydstill reported an active capture session attributed to theSkyComputerUseServicePID.Representative sanitized log evidence:
The
screenframeCountsamples were taken five seconds apart, corresponding to roughly 55–56 captured frames per second. Frames continued to be generated even when none were displayed and all were evicted.Resetting the current
node_replComputer Use client stopped one capture stream, but another stream continued at the same rate.WindowServerremained around 46–49% CPU during a separate 10-secondtopsample with no UI automation calls being made.No
GPU reset,GPU hang,AGX timeout,GPU fault, orMetal faultappeared in the same one-hour log window.Expected behavior
When the Computer Use tool call/turn/session ends and there is no active consumer:
SkyComputerUseServiceshould not continue producing frames that are immediately evicted;WindowServerGPU usage should return to its normal idle level.Workaround
Fully quit Codex with Cmd-Q, wait for
SkyComputerUseServiceandSkyComputerUseClientto exit, and reopen Codex.Suggested fix
event-stream mcpclients and prevent multiple abandoned clients from keeping capture alive.Related issue
SkyComputerUseClient turn-endednotifier helpers. This report is related but distinct: the leaked clients here areevent-stream mcpclients and an active ScreenCaptureKit stream continues rendering at high frame rate, causing sustainedWindowServerGPU load.