codex - 💡(How to fix) Fix Locked Computer Use fails with cgWindowNotFound on Mac mini M4 + Studio Display

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…

Locked Computer Use fails only while the Mac is locked.

Normal Computer Use works correctly when the Mac is unlocked. The issue persists after reinstalling Codex, rebooting, re-enabling Locked Computer Use, testing in a new thread, and preventing display/system sleep with caffeinate.

Error Message

When trying to use Computer Use while the Mac is locked:

Computer Use server error -10005: cgWindowNotFound

Root Cause

This does not appear to be a general Computer Use permission issue because Computer Use works normally while the Mac is unlocked.

Code Example

Computer Use server error -10005: cgWindowNotFound

---

caffeinate -d -i -s -t 900

---

PreventUserIdleDisplaySleep    1
PreventSystemSleep             1
PreventUserIdleSystemSleep     1

---

Computer Use server error -10005: cgWindowNotFound

---

/Library/Security/SecurityAgentPlugins/CodexComputerUseAuthorizationPlugin.bundle

---

com.openai.sky.CUAService.AuthorizationPlugin

---

com.openai.sky.CUAService.AuthorizationPlugin.remote
use-login-window-ui

---

Authority=Developer ID Application: OpenAI OpCo, LLC (2DC432GLL2)
TeamIdentifier=2DC432GLL2

---

Computer Use server error -10005: cgWindowNotFound
RAW_BUFFERClick to expand / collapse

Locked Computer Use fails with cgWindowNotFound on Mac mini M4 + Studio Display

Summary

Locked Computer Use fails only while the Mac is locked.

Normal Computer Use works correctly when the Mac is unlocked. The issue persists after reinstalling Codex, rebooting, re-enabling Locked Computer Use, testing in a new thread, and preventing display/system sleep with caffeinate.

Environment

  • Mac: Mac mini M4
  • Display: Apple Studio Display
  • macOS: 26.5, build 25F71
  • Codex: 26.519.31651, build 3017
  • Computer Use helper: 1.0.799
  • Region: South Korea

Error

When trying to use Computer Use while the Mac is locked:

Computer Use server error -10005: cgWindowNotFound

What works

Computer Use works normally when the Mac is unlocked.

For example, Codex can inspect and operate desktop apps successfully in an unlocked session.

What fails

Locked Computer Use fails when the Mac is locked, even from a new thread.

The failure happens when trying to access an app via Computer Use after locking the Mac.

Things already tried

  • Reinstalled Codex
  • Rebooted multiple times
  • Disabled and re-enabled Locked Computer Use
  • Re-granted macOS Screen Recording permission
  • Re-granted macOS Accessibility permission
  • Tested from a new Codex thread
  • Tested with an already approved app
  • Ran:
caffeinate -d -i -s -t 900

pmset -g assertions confirmed that caffeinate was active:

PreventUserIdleDisplaySleep    1
PreventSystemSleep             1
PreventUserIdleSystemSleep     1

Even with display/system sleep prevented, Locked Computer Use still failed with:

Computer Use server error -10005: cgWindowNotFound

Local configuration evidence

The Computer Use authorization plugin appears to be installed:

/Library/Security/SecurityAgentPlugins/CodexComputerUseAuthorizationPlugin.bundle

The bundle identifier is:

com.openai.sky.CUAService.AuthorizationPlugin

The macOS authorization database includes the OpenAI plugin in system.login.screensaver:

com.openai.sky.CUAService.AuthorizationPlugin.remote
use-login-window-ui

The plugin appears signed by OpenAI:

Authority=Developer ID Application: OpenAI OpCo, LLC (2DC432GLL2)
TeamIdentifier=2DC432GLL2

Expected behavior

Locked Computer Use should temporarily unlock the Mac for an active trusted Computer Use turn, cover the display, operate the approved app, and then relock.

Actual behavior

Locked Computer Use cannot capture app state after the Mac is locked and returns:

Computer Use server error -10005: cgWindowNotFound

Notes

This does not appear to be a general Computer Use permission issue because Computer Use works normally while the Mac is unlocked.

It also does not appear to be only a display sleep issue because the problem persists while caffeinate is actively preventing display and system sleep.

This may be specific to the combination of:

  • Mac mini M4
  • Apple Studio Display
  • macOS 26.5
  • Locked Computer Use

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

FAQ

Expected behavior

Locked Computer Use should temporarily unlock the Mac for an active trusted Computer Use turn, cover the display, operate the approved app, and then relock.

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING