Locked Computer Use fails with cgWindowNotFound on Mac mini M4 + Studio Display
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, build3017 - 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
12 Comments
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action
I’m seeing the same locked-use failure.
Environment:
Macmini9,125F7125.5.0 ... RELEASE_ARM64_T8103 arm6426.519.31651, CFBundleVersion30171.0.799What works while unlocked:
Affinity - Teal.png [Read Only] @ 526%Personal — about:blankWhat fails while locked:
get_app_statereturnedremoteConnectionafter ~32s.Computer Use server error -10005: cgWindowNotFoundget_app_statereturnedremoteConnectionafter ~11s.Computer Use server error -10005: cgWindowNotFoundLocked 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.bundleexists.system.login.screensaverincludescom.openai.sky.CUAService.AuthorizationPlugin.remote.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 withcgWindowNotFound.I am seeing the same Locked Computer Use failure shape, but with a slightly different failure mode:
get_app_statehangs until timeout, and an earlier locked-state attempt generated freshSkyComputerUseServicecrash reports.Environment
26.519.41501, build304426.4.1, build25E253com.openai.sky.CUAService, version1.0, build799/Applications/Codex.app/Contents/Resources/plugins/openai-bundled/plugins/computer-use/Codex Computer Use.app/Applications/Codex.app/...~/.codex/computer-use/Codex Computer Use.appSettings / permissions
Control: unlocked state works
When the Mac is unlocked, Computer Use works normally:
list_appssucceeds.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_appsstill succeeds, so the MCP entry point is alive.get_app_state("com.apple.finder")hangs until the tool timeout:In an earlier locked-state test, the same locked-use path generated two fresh crash reports:
Crash report summary:
Notes
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.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_appsworks, butget_app_statefor Calculator/Finder fails withComputer Use server error -10005: cgWindowNotFound.Environment from my repro:
26.519.41501, build30441.0, build799IOConsoleLocked = YesAppleClamshellState = NoSkyComputerUseServicedid not resolve it.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.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:
system.login.screensaverincludes:The installed authorization plugin is present at:
and is signed by OpenAI:
Version / environment
New crash evidence
There is also a fresh
SkyComputerUseServicecrash report from the same testing session:Crash summary:
The report includes
CodexAppServerThreadEventObserver.connectionand 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
cgWindowNotFoundor the helper crashes/hangs.Happy to provide a sanitized crash excerpt if useful.
When I reproduce the issue the following can be seen by:
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"'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
I’m seeing what appears to be the same Locked Computer Use failure, but on a different hardware setup.
My setup:
25F7126.527.30818, build33700.1.0, build799en_USWhat works:
What fails:
Computer Use server error -10005: cgWindowNotFoundThings I’ve tried:
Things I have not tried:
caffeinateyet.Local config details:
/Library/Security/SecurityAgentPlugins/CodexComputerUseAuthorizationPlugin.bundleexistscom.openai.sky.CUAService.AuthorizationPluginDeveloper ID Application: OpenAI OpCo, LLC (2DC432GLL2)system.login.screensaverincludes:com.openai.sky.CUAService.AuthorizationPlugin.remoteuse-login-window-uiI’m also reproducing this on another Apple Silicon Mac. This is a standalone report from my local testing.
Environment
26.5, build25F7126.527.30818, build33701.0, build799The 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_appssucceeds.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
Locked repro
I then explicitly locked the Mac and confirmed the real macOS lock state:
Locked result:
list_appsstill succeeds.get_app_state("com.apple.finder")returns:No fresh
SkyComputerUseServicecrash report was created during this latest repro.Logs / local observations
In the local logs for this latest repro, I did not see:
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:
Earlier locked testing also produced a
SkyComputerUseServicecrash with: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.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:
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.
I may be hitting the same Locked Computer Use class of bug, though with a different failure signature.
Environment:
26.601.21317/ build351126.6build25G5028f, Apple Silicon /arm64com.openai.sky.CUAServiceversion1.0, build799What matches this issue:
What differs:
cgWindowNotFound, Finderget_app_statehangs indefinitely while locked.IOConsoleLocked=YesandCGSSessionScreenIsLocked=Yes.SkyComputerUseServicespins at about 38% CPU with about 1.4 GB physical footprint.SkyComputerUseServicemakes the pending MCP request returnisError: truewithremoteConnection.sampleshows a repeated recursive-looking frame inSkyComputerUseServiceat+0x58fa48oncom.apple.root.default-qos.cooperative.Earlier pre-reboot attempts also logged:
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
sampleoutput 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
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.