macOS computer use repeatedly hangs on getState/getApp(Safari), exceeds timeout, requires desktop restart
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 125k
- Forks
- 19.4k
- PR merge metrics
- PR metrics pending
Description
Summary
Codex desktop computer use repeatedly hangs while acquiring Safari or reading the general app/browser inventory. Restarting the desktop app has temporarily restored work, but the problem returns. This report is submitted by Codex at the user's explicit request, based on observed tool errors and locally inspected app metadata.
Environment
- macOS 26.6.2 (build 25G83).
- Observed September 12–13, 2026, America/Los_Angeles.
- Tool: mcp__cua_repl.js; native Safari via cua.getApp("com.apple.Safari").
- Two installed application bundles were found:
- /Applications/Codex.app: version 26.715.72359, build 5718.
- /Applications/ChatGPT.app: version 26.908.40834, build 8881.
- Both bundles declare com.openai.codex. The currently running binary was not independently verified. Selecting cua.getApp("com.openai.codex") returns an ambiguous-identifier error listing both bundles. This is an additional diagnostic observation, not an established cause of the Safari failure.
Observed sequence
- Use native Safari through computer use to navigate a signed-in stock-image site and download licensed images and PDF certificates.
- This worked for a substantial run: 88 originals and 88 certificates were independently verified on disk.
- Later attempts to reacquire Safari or retrieve global state hung:
await cua.getApp("com.apple.Safari");
await cua.getState(); - Calls returned:
js execution timed out; kernel reset, rerun your request - Retrying after a runtime reset also failed. The user has repeatedly restarted the desktop app to continue; temporary recovery has been observed, followed by recurrence.
There is no deterministic minimal reproducer yet.
Exact errors and timing observations
- Calls configured with timeout_ms: 20000 took substantially longer in observed tool wall time: getState approximately 103.6 seconds and 63.1 seconds; getApp(Safari) approximately 76.9 seconds and 40.2 seconds.
- On another attempt Safari acquisition took approximately 92.8 seconds and returned only an unknown window/toolbar without usable page content.
- Two consecutive Safari state/acquisition calls returned:
Computer Use server error -10005: cgWindowNotFound
(approximately 12.0 and 18.2 seconds). - Subsequent inventory still reported Safari as running.
- File/command operations and unrelated connectors remained usable while computer-control calls failed.
Expected behavior
App acquisition and global state reads should return usable state or a specific diagnostic within a bounded timeout. A transient failure should be recoverable without repeatedly restarting the entire desktop app. Please investigate timeout/cancellation handling and window acquisition, and provide a targeted recovery or diagnostic procedure.
Impact
Repeated manual restarts and resume requests interrupt approved work. Four further approved downloads remain queued. Existing verified files are preserved.
Separate related symptom
Before using Safari, the in-app browser could register an Envato license and report image/certificate download actions, but the expected files did not appear in the configured intake folder and no saved path was exposed by the available download interface. Safari successfully delivered the same item afterward. It is unknown whether this download-delivery issue shares a cause with the later computer-use hangs.
Related reports checked
- #44906: Apple Mail detected as running, but cgWindowNotFound.
- #30797: Chrome running, but window acquisition returns cgWindowNotFound.
- #43435: browser timeouts followed by an apparently incorrect lock-state report.
These are related symptoms, not confirmed duplicates. This report specifically includes Safari/global-inventory hangs and observed wall times exceeding the requested timeout.
No raw session logs, credentials, license files, private page contents, or customer information are attached. Root cause remains unconfirmed.
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 with mcp__cua_repl.js and the calls to cua.getApp("com.apple.Safari") and cua.getState(), reproducing the timeout and cgWindowNotFound observations if possible. Compare the requested timeout_ms with the observed wall times and check recovery after a runtime reset. Done means failed acquisition or inventory reads return usable state or a specific diagnostic within a bounded timeout without restarting the desktop app.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, macos
- Domain
- desktop, operating-systems
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Needs clarification
- Newbie friendliness
- 38/100