Computer Use service crashes with excessive recursion when inspecting Microsoft Outlook on macOS

Open 💬 0 comments Opened Jul 11, 2026 by reinoudvanwageningen-droid

What version of the Codex App are you using (From “About Codex” dialog)?

version 26.707.41301

What subscription do you have?

pro

What platform is your computer?

macOS

What issue are you seeing?

Codex Computer Use cannot inspect or control Microsoft Outlook for Mac because SkyComputerUseService crashes while building Outlook's macOS accessibility tree.

The error shown to Codex is:

Sky Computer Use native pipe closed before response

The macOS crash report shows that this is caused by a stack overflow inside SkyComputerUseService:

Exception: EXC_BAD_ACCESS / SIGBUS
Message: Thread stack size exceeded due to excessive recursion
Recursion depth: 129
Faulting process: SkyComputerUseService

This does not appear to be a missing accessibility permission, a stale Outlook process, or a generic Microsoft Office problem.

What steps can reproduce the bug?

  1. Start Microsoft Outlook for Mac.
  2. Initialize the bundled Computer Use runtime.
  3. Request the app state:

``js
await sky.get_app_state({
app: "com.microsoft.Outlook",
disableDiff: true,
});
``

  1. The call fails with:

``text
Sky Computer Use native pipe closed before response
``

  1. macOS creates a crash report for SkyComputerUseService in:

``text
~/Library/Logs/DiagnosticReports/SkyComputerUseService-*.ips
``

What is the expected behavior?

Computer Use should return Outlook's accessibility state and screenshot, or prune an invalid accessibility subtree and return a partial result.

Actual result

SkyComputerUseService recursively traverses the accessibility graph until its thread stack is exhausted. The process exits, closes the native socket, and the client can only report that the native pipe closed.

After this failure, actions such as press_key also cannot be used because Computer Use requires a successful get_app_state call before performing an action.

Isolation tests

| Test | Result |
|---|---|
| Read Finder state | Works, 4,719 characters of accessibility output |
| Read Microsoft Excel state | Works, 5,744 characters of accessibility output |
| Read Outlook by display name | Service crashes |
| Read Outlook by bundle identifier | Service crashes |
| Restart Outlook and retry | Service crashes |
| Start a fresh Computer Use session | Service crashes |
| Hide Outlook's reading pane | Service crashes |
| Switch from New Outlook to Legacy Outlook | Service crashes |

Both Outlook preferences changed for testing were restored afterward. No messages, accounts, or calendar items were changed.

Crash evidence

Sanitized excerpt from the macOS .ips report:

app_name: SkyComputerUseService
app_version: 26.708.1000366
bundleID: com.openai.sky.CUAService
os_version: macOS 27.0 (26A5353q)
architecture: ARM-64

exception:
  type: EXC_BAD_ACCESS
  signal: SIGBUS
  message: Thread stack size exceeded due to excessive recursion

faulting thread:
  queue: com.apple.root.user-initiated-qos.cooperative
  recursion depth: 129
  repeated frame: SkyComputerUseService image offset 6971280

The complete crash report is available if needed, but it contains local incident and device identifiers and should not be posted publicly without redaction.

Likely root cause

Outlook or macOS appears to expose an accessibility graph that is cyclic or deeply nested. The Computer Use accessibility serializer appears to treat it as a normal tree and recursively descends without sufficient cycle detection or a safe depth limit.

The service binary is stripped, so the repeated internal function could not be symbolicated locally. The crash report still clearly identifies excessive recursion and 129 repeated frames in the service.

Suggested fix

Please make the accessibility traversal defensive:

  1. Track the AX elements on the current traversal path. If an element is already being visited, emit a reference or [cycle] marker instead of descending again.
  2. Enforce a hard maximum depth, for example 64, plus maximum node and serialized-byte budgets.
  3. Recurse only through structural child relationships such as AXChildren. Treat AXParent, AXLinkedUIElements, AXTitleUIElement, and similar relationships as references.
  4. Prefer iterative depth-first traversal with an explicit stack instead of using the Swift call stack.
  5. Prune one invalid subtree without failing the entire app-state request.
  6. If accessibility serialization fails, return at least a screenshot-only state so coordinate-based actions remain possible.
  7. Convert traversal failures into structured errors instead of allowing SkyComputerUseService to exit and close the native pipe.

Suggested regression tests:

  • a synthetic A -> B -> A accessibility cycle;
  • a shared AX node reachable through two valid branches;
  • more than 100 nested accessibility groups;
  • Outlook 16.110.3 on macOS 27;
  • trees that exceed node and byte budgets.

Current workaround

  • Use the Outlook Email connector for mailbox operations.
  • Use the Outlook Calendar connector for calendar operations.
  • Use Outlook on the web through browser automation for unsupported operations.
  • Avoid controlling the Outlook Mac app with Computer Use until the service is updated beyond version 26.708.1000366.

Privacy note

Please do not request or publish the user's Outlook preferences backup. It may contain Outlook configuration and account-related identifiers. A sanitized crash excerpt is included above.

Additional information

_No response_

View original on GitHub ↗