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

Resolved 💬 12 comments Opened May 22, 2026 by yoonpooh Closed Jul 10, 2026
💡 Likely answer: A maintainer (github-actions[bot], contributor) responded on this thread — see the highlighted reply below.

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

View original on GitHub ↗

12 Comments

github-actions[bot] contributor · 1 month ago

Potential duplicates detected. Please review them and close your issue if it is a duplicate.

  • #24013

Powered by Codex Action

bgustafson92 · 1 month ago

I’m seeing the same locked-use failure.

Environment:

  • Mac: Mac mini, Apple M1, 16 GB, Macmini9,1
  • Display: Dell U2715H, main display, 1680x1050 @ 60 Hz
  • macOS: 26.5, build 25F71
  • Darwin: 25.5.0 ... RELEASE_ARM64_T8103 arm64
  • Codex app: 26.519.31651, CFBundleVersion 3017
  • Computer Use helper: 1.0.799

What works while unlocked:

  • Computer Use can inspect and operate Affinity.
  • It saw Affinity - Teal.png [Read Only] @ 526%
  • It successfully focused/clicked Affinity’s zoom combo box.
  • Computer Use can inspect and operate Safari.
  • It saw Personal — about:blank
  • It successfully clicked/focused Safari UI.

What fails while locked:

  • Affinity:
  • First get_app_state returned remoteConnection after ~32s.
  • Immediate retry returned:

Computer Use server error -10005: cgWindowNotFound

  • Safari:
  • First get_app_state returned remoteConnection after ~11s.
  • Immediate retry returned:

Computer Use server error -10005: cgWindowNotFound

Locked use is enabled in Codex settings. “Any App” control is enabled. This does not look like a normal Screen Recording / Accessibility / app approval issue because the same apps work through Computer Use immediately after unlocking.

I also checked the local setup:

  • /Library/Security/SecurityAgentPlugins/CodexComputerUseAuthorizationPlugin.bundle exists.
  • system.login.screensaver includes com.openai.sky.CUAService.AuthorizationPlugin.remote.
  • The plug-in is signed by OpenAI Team ID 2DC432GLL2.

A short unified-log query after the failed attempt did not surface a Library Validation line on this machine, but the user-visible failure matches this issue exactly: locked path enters remoteConnection, then app capture fails with cgWindowNotFound.

wousp112 · 1 month ago

I am seeing the same Locked Computer Use failure shape, but with a slightly different failure mode: get_app_state hangs until timeout, and an earlier locked-state attempt generated fresh SkyComputerUseService crash reports.

Environment

  • Codex app: 26.519.41501, build 3044
  • macOS: 26.4.1, build 25E253
  • Apple Silicon Mac
  • Computer Use helper: com.openai.sky.CUAService, version 1.0, build 799
  • Helper path: /Applications/Codex.app/Contents/Resources/plugins/openai-bundled/plugins/computer-use/Codex Computer Use.app
  • Helper code signature verification passes for both:
  • bundled helper under /Applications/Codex.app/...
  • cached helper under ~/.codex/computer-use/Codex Computer Use.app

Settings / permissions

  • Computer Use is enabled in Codex.
  • Locked Computer Use is enabled in Codex settings.
  • Accessibility and Screen & System Audio Recording permissions are enabled for Codex / Codex Computer Use.
  • Normal Computer Use app approvals include apps such as Finder, Calculator, TextEdit, and Chrome.

Control: unlocked state works

When the Mac is unlocked, Computer Use works normally:

  • list_apps succeeds.
  • get_app_state("com.apple.finder") succeeds and returns both screenshot and Accessibility tree.
  • get_app_state("com.apple.calculator") also succeeds and returns both screenshot and Accessibility tree.

So this does not appear to be a general Computer Use permission failure or a missing helper/plugin issue.

Failure: locked state hangs / crashes

When the Mac is locked:

  • list_apps still succeeds, so the MCP entry point is alive.
  • get_app_state("com.apple.finder") hangs until the tool timeout:
timed out awaiting tools/call after 120s

In an earlier locked-state test, the same locked-use path generated two fresh crash reports:

~/Library/Logs/DiagnosticReports/SkyComputerUseService-2026-05-23-145424.ips
~/Library/Logs/DiagnosticReports/SkyComputerUseService-2026-05-23-145436.ips

Crash report summary:

Process: SkyComputerUseService
Bundle ID: com.openai.sky.CUAService
Helper build: 799
Exception: EXC_BAD_ACCESS / SIGBUS
Message: Thread stack size exceeded due to excessive recursion
Faulting path includes CodexAppServerThreadEventObserver.connection / AXNotificationObserver-related frames

Notes

  • This reproduces after locking the Mac even though Locked Computer Use is enabled.
  • It is not fixed by using a new Codex thread.
  • It is not fixed by using a remote connected device to start/continue the task.
  • The important control is that the exact same Codex installation can inspect Finder and Calculator successfully immediately after unlocking.

Expected behavior: Locked Computer Use should either return screenshot/AX state for approved apps or fail quickly with a controlled error. It should not hang for 120 seconds or crash SkyComputerUseService.

ElRobaMichis · 1 month ago

I submitted Codex feedback for the same issue.

Feedback ID:
019e55ed-1f90-7ee3-9a36-cacbce445503

Same repro: Locked Computer Use fails while the Mac is locked. list_apps works, but get_app_state for Calculator/Finder fails with Computer Use server error -10005: cgWindowNotFound.

Environment from my repro:

  • Codex app: 26.519.41501, build 3044
  • Computer Use helper: 1.0, build 799
  • Mac was locked: IOConsoleLocked = Yes
  • Lid was open / not clamshell: AppleClamshellState = No
  • Restarting SkyComputerUseService did not resolve it.
bgustafson92 · 1 month ago

Follow-up to my earlier report with another controlled locked/unlocked test.

New control result: unlocked Computer Use works

After manually unlocking the Mac, the same Computer Use path succeeds.

Example:

  • get_app_state("Reminders") returned a valid Reminders window.
  • It included both a screenshot and accessibility tree.
  • The only visible blocker was Reminders’ own “What’s New in Reminders” dialog, so the app target and normal Computer Use capture path are working.

This reinforces that the failure is locked-use-specific, not a general Screen Recording / Accessibility / app approval issue.

Locked-use installation evidence

On this machine, the locked-use authorization hook appears installed:

CodexComputerUseAuthorizationPluginInstallerTool status ... => OK: installed

system.login.screensaver includes:

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

The installed authorization plugin is present at:

/Library/Security/SecurityAgentPlugins/CodexComputerUseAuthorizationPlugin.bundle

and is signed by OpenAI:

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

Version / environment

macOS: 26.5, build 25F71
Codex app: 26.519.41501, build 3044
Computer Use helper: 1.0, build 799
Architecture: Apple Silicon

New crash evidence

There is also a fresh SkyComputerUseService crash report from the same testing session:

~/Library/Logs/DiagnosticReports/SkyComputerUseService-<timestamp>.ips

Crash summary:

Process: SkyComputerUseService
Bundle ID: com.openai.sky.CUAService
Helper build: 799
Exception: EXC_BAD_ACCESS / SIGBUS
Message: Thread stack size exceeded due to excessive recursion

The report includes CodexAppServerThreadEventObserver.connection and Accessibility notification observer frames.

Interpretation

This machine does not show the same Library Validation evidence described in #24013, at least from the short unified-log checks I ran. The local evidence instead points to a locked-use runtime/helper failure: unlocked app capture works, locked authorization appears installed, but locked app-state capture either returns cgWindowNotFound or the helper crashes/hangs.

Happy to provide a sanitized crash excerpt if useful.

seandjones92 · 1 month ago

When I reproduce the issue the following can be seen by:

  1. Running the following command in the terminal:log stream --style compact --predicate 'process == "SecurityAgentHelper-arm64" OR eventMessage CONTAINS[c] "CodexComputerUseAuthorizationPlugin" OR eventMessage CONTAINS[c] "platform binary" OR eventMessage CONTAINS[c] "mapped file is not"'
  2. Locking the screen
  3. Reproducing the issue
  4. Checking the terminal output once unlocked again:
2026-05-26 18:41:26.009 E  SecurityAgentHelper-arm64[48088:269ba6] [com.apple.BaseBoard:Common] Unable to obtain a task name port right for pid 599: (os/kern) failure (0x5)
2026-05-26 18:41:26.013 E  kernel[0:269ba3] (AppleMobileFileIntegrity) Library Validation failed: Rejecting '/Library/Security/SecurityAgentPlugins/StagedPlugins/CodexComputerUseAuthorizationPlugin.bundle/Contents/MacOS/CodexComputerUseAuthorizationPlugin' (Team ID: 2DC432GLL2, platform: no) for process 'SecurityAgentHel(48088)' (Team ID: N/A, platform: yes), reason: mapping process is a platform binary, but mapped file is not

I see this every time I try to use Locked Computer User and get cgWindowNotFound

Submitted feedback through the app. Feedback ID: 019f3e92-390f-7ef1-89e1-8597128627c6

heysonder · 1 month ago

I’m seeing what appears to be the same Locked Computer Use failure, but on a different hardware setup.

My setup:

  • Mac: MacBook Pro, Mac17,9
  • Chip: Apple M5 Pro
  • Memory: 48 GB
  • Display: built-in Liquid Retina XDR display, no external display attached
  • macOS: 26.5, build 25F71
  • Codex: 26.527.30818, build 3370
  • Computer Use authorization plugin: 0.1.0, build 799
  • Region/locale: en_US
  • ChatGPT iOS app: up to date as of May 29, 2026

What works:

  • Computer Use works normally while the Mac is unlocked. I tested normal app inspection/control successfully while unlocked.

What fails:

  • Locked Computer Use fails when trying to use Computer Use while the Mac is locked.
  • The error I see is:

Computer Use server error -10005: cgWindowNotFound

Things I’ve tried:

  • Rebooted the computer
  • Turned Locked Computer Use off and back on
  • Force quit and reopened Codex
  • Confirmed the ChatGPT iOS app is up to date
  • Tried the usual restart/toggle/reopen combinations

Things I have not tried:

  • I have not tried caffeinate yet.

Local config details:

  • /Library/Security/SecurityAgentPlugins/CodexComputerUseAuthorizationPlugin.bundle exists
  • Bundle identifier: com.openai.sky.CUAService.AuthorizationPlugin
  • Signed by: Developer ID Application: OpenAI OpCo, LLC (2DC432GLL2)
  • system.login.screensaver includes:
  • com.openai.sky.CUAService.AuthorizationPlugin.remote
  • use-login-window-ui
konarkm · 1 month ago

I’m also reproducing this on another Apple Silicon Mac. This is a standalone report from my local testing.

Environment

  • macOS: 26.5, build 25F71
  • Codex app: 26.527.30818, build 3370
  • Computer Use helper: 1.0, build 799
  • Locked Computer Use enabled in Codex settings

The important version detail is that after the Codex app update, the Computer Use helper is still build 799.

Control: normal Computer Use works

While the console session is unlocked / screen-active:

  • list_apps succeeds.
  • get_app_state("com.apple.finder") succeeds and returns both screenshot and Accessibility tree.

So this does not look like a general Accessibility / Screen Recording permission failure.

Things I tried before the locked repro

  • Toggled Locked Computer Use off/on in Codex settings.
  • Restarted Codex.
  • Re-enabled Computer Use and Locked Computer Use.
  • Tested from a fresh Codex thread so the Computer Use MCP surface was healthy.
  • Verified normal Finder capture still worked before locking.

Locked repro

I then explicitly locked the Mac and confirmed the real macOS lock state:

IOConsoleLocked = Yes
CGSSessionScreenIsLocked = Yes

Locked result:

  • list_apps still succeeds.
  • get_app_state("com.apple.finder") returns:
Computer Use server error -10005: cgWindowNotFound

No fresh SkyComputerUseService crash report was created during this latest repro.

Logs / local observations

In the local logs for this latest repro, I did not see:

SecurityAgentHelper-arm64
Library Validation
mapped file is not

In an earlier locked repro on the same machine, I did see the helper get as far as display wake / app-state work and then log:

[inc.software.app:ApplicationUIElement] log0067
[inc.software.app:ApplicationUIElement] log0068 <private>

Earlier locked testing also produced a SkyComputerUseService crash with:

Exception: EXC_BAD_ACCESS / SIGBUS
Message: Thread stack size exceeded due to excessive recursion
Faulting queue: com.apple.root.default-qos.cooperative

Interpretation

On this machine, the latest repro still fails after settings toggle + Codex restart + fresh thread + confirmed real lock state. Because unlocked capture works and the helper remains build 799, this looks like a locked-session helper/runtime issue rather than a normal local permission setup issue.

anchia-hsu · 1 month ago

Update as of 2026-06-03:

Codex app has updated to 26.601.21317 (build 3511), but the Locked Computer Use authorization plugin is still build 799 in all locations checked:

  • /Library/Security/SecurityAgentPlugins/CodexComputerUseAuthorizationPlugin.bundle
  • ~/.codex/computer-use/Codex Computer Use.app
  • /Applications/Codex.app/.../computer-use/.../CodexComputerUseAuthorizationPlugin.bundle

The same Library Validation error still appears:

Library Validation failed: Rejecting ... CodexComputerUseAuthorizationPlugin ...
reason: mapping process is a platform binary, but mapped file is not

So recent Codex app updates do not appear to update the locked-use plugin or resolve this issue.

heyobravo · 1 month ago

I may be hitting the same Locked Computer Use class of bug, though with a different failure signature.

Environment:

  • Codex Desktop 26.601.21317 / build 3511
  • macOS 26.6 build 25G5028f, Apple Silicon / arm64
  • Computer Use helper com.openai.sky.CUAService version 1.0, build 799
  • Built-in MacBook Pro display, no external display in this repro

What matches this issue:

  • Normal Computer Use works while unlocked.
  • Locked Computer Use fails only after the Mac is locked.
  • Rebooting and re-testing did not fix it.
  • Accessibility / Screen Recording are granted, and the authorization plugin reports installed.

What differs:

  • Instead of returning cgWindowNotFound, Finder get_app_state hangs indefinitely while locked.
  • During the hang, macOS reports IOConsoleLocked=Yes and CGSSessionScreenIsLocked=Yes.
  • SkyComputerUseService spins at about 38% CPU with about 1.4 GB physical footprint.
  • Killing SkyComputerUseService makes the pending MCP request return isError: true with remoteConnection.
  • A sample shows a repeated recursive-looking frame in SkyComputerUseService at +0x58fa48 on com.apple.root.default-qos.cooperative.

Earlier pre-reboot attempts also logged:

SkyComputerUseService: Unable to find display with ID 1.
UIElementTree<TransformedUIElement> log0060 201 200

After a full reboot, the log storm did not recur, but the locked-session hang/high-CPU/recursive-stack behavior did.

I can provide the full sample output if useful. I have not attached it initially to avoid posting a large diagnostic file publicly before maintainers ask for it.

Related new issue: https://github.com/openai/codex/issues/26415

seandjones92 · 11 days ago

The new update that turned codex into "ChatGPT Work" resolved it for me

heyobravo · 11 days ago
The new update that turned codex into "ChatGPT Work" resolved it for me

It fixed it for me as well, but introduced a new issue: when it was done working, it automatically unlocked my Mac and left it open on the desktop. Not a big deal for me _personally_ as I don't work in public and my Mac is in my home office. But I could see this being problem for people who leave their machines in shared spaces.