[macOS][Computer Use] Apple Mail is detected as running but cua.getApp fails with cgWindowNotFound (-10005)
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 125k
- Forks
- 19.4k
- PR merge metrics
- PR metrics pending
Description
What issue are you seeing?
On September 11, 2026, Codex Computer Use repeatedly failed to access Apple Mail even though Mail was running and its main window was visibly open.
cua.listApps() detects Apple Mail as a running application, but attempting to access it with:
cua.getApp("com.apple.mail")
fails with:
Computer Use server error -10005: cgWindowNotFound
Reopening Apple Mail's main window did not resolve the failure. No email was created or sent.
Steps to reproduce
- Start Apple Mail and make sure its main window is visible.
- Ask Codex / Computer Use to interact with Apple Mail.
- Confirm that Mail is present in
cua.listApps(). - Call
cua.getApp("com.apple.mail"). - Observe
Computer Use server error -10005: cgWindowNotFound. - Reopen or refocus the Mail main window and retry.
- The same error persists.
Expected behavior
If Apple Mail is running and has a visible main window, Computer Use should be able to resolve the application window and return its state for inspection and interaction.
Actual behavior
Mail is recognized as running, but window acquisition fails with cgWindowNotFound (-10005).
Diagnostic evidence
Reproduction time: 2026-09-11 around 22:38:38 CEST / 20:38:38 UTC.
Task / feedback context ID: 01a09227-7416-79f1-8f9e-83d51e0685df
Local diagnostics around the failure showed:
- The Computer Use service was reported as available.
- macOS allowed the internal Apple Events communication used by the control service, including log entries equivalent to
ACCESS GRANTEDandSkCu/XpcB = accepted. - This confirms the internal Apple Events path was permitted, but does not by itself prove that screen capture or Mail window acquisition permissions were functioning.
cgWindowNotFounditself did not appear in the inspected macOS/Desktop log stream; it was returned by the Computer Use call.- The desktop log showed repeated
ResizeObserver loop completed with undelivered notificationsmessages around the same time. No causal relationship has been established.
No permissions were reset and no system settings were changed during diagnosis.
Related issue observed on the same account
The same account also previously encountered Browser Use failures with:
The admin-enforced policy could not be verified.
That browser issue has been reported separately. There is currently no evidence that the browser policy-verification failure and this Apple Mail cgWindowNotFound failure share the same root cause.
Request
Please investigate why Computer Use can detect Apple Mail as running but cannot resolve its visible window, and provide a targeted diagnostic or recovery path for cgWindowNotFound (-10005).
Potentially related reports include other -10005 window-resolution failures such as #38508, but this report is specifically about Apple Mail being detected as running while cua.getApp("com.apple.mail") cannot acquire its visible window.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the macOS sequence with cua.listApps() and cua.getApp("com.apple.mail") while Mail's main window is visible, then compare the Computer Use diagnostics with the reported -10005 error. Done means identifying why the visible window is not resolved and providing a targeted diagnostic or recovery path for this failure.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- macos
- Domain
- desktop, operating-systems
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100