macOS Appshots fail with cgWindowNotFound even though screencapture works

Open 💬 0 comments Opened Jun 12, 2026 by kchristidis

What version of the Codex App are you using?

Codex Desktop 149.0.7827.54

What subscription do you have?

ChatGPT Pro

What platform is your computer?

  • macOS 26.5.1 (25F80)
  • Darwin 25.5.0
  • Apple Silicon / arm64

What issue are you seeing?

Appshots consistently fail with the user-facing error:

Unable to attach appshot

The hotkey is received and Codex correctly identifies the frontmost target app, but the capture worker fails before producing either screenshot data or Accessibility text.

This reproduces across multiple target apps, including:

  • Notes, bundle identifier com.apple.Notes
  • Finder, bundle identifier com.apple.finder
  • Claude Desktop, bundle identifier com.anthropic.claudefordesktop

The key failure is:

Codex Computer Use Apple Event error -10005: cgWindowNotFound
failureReason=start_request_failed:computer_use:-10005
hadAxText=false
hadScreenshot=false
status=failed

Concrete log example from Notes:

2026-06-12T09:08:30.134Z info Appshot hotkey pressed hotkey=DoubleCommand
2026-06-12T09:08:30.150Z info Appshot shortcut found target bundleIdentifier=com.apple.Notes frontmostWindowElapsedMs=15 name=Notes
2026-06-12T09:08:30.153Z info Appshot capture request created bundleIdentifier=com.apple.Notes name=Notes requestId=c9f197a7-ce12-4be0-b9b6-5ea3193971fe source=hotkey
2026-06-12T09:08:30.159Z info Appshot capture start request sent bundleIdentifier=com.apple.Notes name=Notes requestId=c9f197a7-ce12-4be0-b9b6-5ea3193971fe source=hotkey
2026-06-12T09:08:30.311Z warning [computer-use-capture-handler] Codex Computer Use capture worker failed errorMessage="Codex Computer Use Apple Event error -10005: cgWindowNotFound" failureReason=start_request_failed:computer_use:-10005 requestId=c9f197a7-ce12-4be0-b9b6-5ea3193971fe
2026-06-12T09:08:30.312Z info [electron-message-handler] Appshot capture settled elapsedMs=159 failureReason=start_request_failed:computer_use:-10005 hadAxText=false hadScreenshot=false requestId=c9f197a7-ce12-4be0-b9b6-5ea3193971fe source=hotkey status=failed

The companion worker log shows:

Computer Use capture worker received start requestId=c9f197a7-ce12-4be0-b9b6-5ea3193971fe
Computer Use start-capture Apple Event failed elapsedMs=56 errorMessage="Codex Computer Use Apple Event error -10005: cgWindowNotFound"
Computer Use capture worker start failed errorMessage="Codex Computer Use Apple Event error -10005: cgWindowNotFound"

What steps can reproduce the bug?

  1. Open Codex Desktop on macOS.
  2. Open Notes, Finder, or another normal visible app window.
  3. Press the Appshot hotkey, DoubleCommand.
  4. Observe the toast: Unable to attach appshot.
  5. Inspect logs under ~/Library/Logs/com.openai.codex/; the capture worker fails with cgWindowNotFound.

What is the expected behavior?

Appshots should capture the frontmost window and attach the screenshot/context to the active Codex thread.

Additional diagnostics performed

This does not appear to be a basic macOS Screen Recording permission issue.

Permissions checked/reset/re-granted:

  • com.openai.codex
  • Accessibility: granted
  • Screen Capture: granted
  • com.openai.sky.CUAService
  • Accessibility: granted
  • Screen Capture: granted
  • Buried nested helper also manually approved in System Settings:
  • ~/.codex/computer-use/Codex Computer Use.app/Contents/SharedSupport/SkyComputerUseClient.app

Other local repair attempts:

  • Full Codex restart.
  • Reset TCC entries for Codex and Codex Computer Use.
  • Killed/restarted Computer Use helper processes.
  • Moved ~/.codex/computer-use aside and allowed Codex to recreate it from the bundled plugin.
  • Verified helper bundle is code-signed/notarized.
  • Confirmed only one installed Codex.app and one recreated ~/.codex/computer-use helper.

Important distinction:

  • CoreGraphics can list normal visible windows for Finder/Claude/Codex.
  • Normal macOS screencapture from the Codex process works for window capture and full-screen capture.
  • The failure appears specific to the Codex Computer Use/Appshot bridge, not system-wide screen capture.

Examples that worked outside the Appshot bridge:

screencapture -x -l <Claude window id> /tmp/codex-appshot-claude-window.png
screencapture -x -l <Finder window id> /tmp/codex-appshot-finder-window.png
screencapture -x /tmp/codex-appshot-fullscreen.png

Related but not identical issue: #25269 reports captureNotFound after capture start succeeds. This report is a different observed failure mode: cgWindowNotFound during start-capture, before any screenshot or AX text is produced.

Current workaround

Use a normal macOS screenshot and attach the PNG manually. This bypasses the Appshot / Computer Use bridge path that is failing.

View original on GitHub ↗