Computer Use helper SIGTRAPs while traversing a SwiftUI accessibility tree; AppShot cannot attach

Open 💬 1 comment Opened Jul 21, 2026 by Coldain

Environment

  • Codex desktop: 26.715.31925 (build 5551)
  • Computer Use helper: com.openai.sky.CUAService, version 26.715.1000451 (build 1000451)
  • macOS: 27.0 (26A5353q)
  • Architecture: Apple Silicon

Issue

AppShot and get_app_state can crash SkyComputerUseService while inspecting a native SwiftUI application with a substantial accessibility tree.

The user-visible AppShot result is:

Unable to attach appshot

The Computer Use tool result is:

Sky Computer Use native pipe closed before response

The target SwiftUI application remains alive. A fresh SkyComputerUseService-*.ips report appears for each failed inspection.

Latest crash receipt

process: SkyComputerUseService
bundle: com.openai.sky.CUAService
version/build: 26.715.1000451 / 1000451
exception: EXC_BREAKPOINT
signal: SIGTRAP
termination: Trace/BPT trap: 5
faulting queue: com.apple.root.user-initiated-qos.cooperative

The faulting thread begins with repeated groups of the same unsymbolicated helper frame offsets, which is consistent with recursive accessibility traversal before the trap. It also has active AXNotificationObserver threads for the target app.

The helper binary UUID in the report matches the installed plugin-cache helper (CE69D64B-5D53-3802-AF72-ED43B10F8AEB).

Reproduction

  1. Open a native SwiftUI macOS app using NavigationSplitView, a large sidebar, scrollable detail content, and an AVPlayerView.
  2. Call get_app_state; the first call can succeed and return a normal screenshot plus accessibility tree.
  3. Select another sidebar destination.
  4. Call get_app_state again.
  5. The native pipe closes and a new helper crash report is written.
  6. list_apps recovers after the helper restarts, while another get_app_state against the same target reproduces the crash.

In this run, the last successful tree had about 120 exposed nodes and a lazily represented sidebar (roughly 200 model rows, only the visible rows exposed), so this is not simply a multi-thousand-node response payload.

Controls

  • The target app process does not crash.
  • list_apps succeeds after helper restart.
  • Screen Recording and Accessibility are already functional; a prior state call returned both screenshot and AX text.
  • The failure reproduces by bundle identifier.
  • Repeated failures create fresh helper crash receipts.
  • No TCC reset changes were needed or performed.

Expected behavior

Accessibility traversal should detect cycles/depth exhaustion, truncate or skip the problematic subtree, and return a controlled warning. The helper should not trap and cause AppShot attachment to fail.

Related issue

This may share traversal logic with #20683, but that report is Outlook-specific and shows EXC_BAD_ACCESS / SIGBUS with explicit stack exhaustion. This case targets a native SwiftUI app on helper build 1000451 and consistently shows EXC_BREAKPOINT / SIGTRAP.

I am omitting the full .ips file because it contains local paths and identifiers, but can provide a sanitized or private crash report if useful.

View original on GitHub ↗

1 Comment

krowd3v · 8 days ago

Additional A/B isolation: complex SwiftUI grouping around mixed AX subtrees

This appears to be the same failure class as #32293 and the topology-sensitive behavior reported in #28933. A new A/B investigation isolated a narrower application-side trigger while preserving the full accessibility tree.

Failure signature

A get_app_state observation failed with:

Sky Computer Use native pipe closed before response

Confirmed crash reports contained:

EXC_BREAKPOINT / SIGTRAP
Array.remove(at:)

The triggered stack repeatedly traversed the accessibility hierarchy through Sequence.compactMap, consistent with an out-of-bounds mutation while transforming or invalidating AX children. The inspected application remained alive.

Isolated structural trigger

The smallest confirmed trigger was a SwiftUI semantic grouping container around an AppKit-backed text subtree:

GroupBox {
    AppKitBackedTextView(...)
}

The represented view returns an NSScrollView containing an NSTextView.

The text view itself is not sufficient to trigger the failure:

  • The same represented text view succeeds when mounted without the grouping wrapper.
  • The isolated section fails when the wrapper is present.
  • Replacing only the semantic grouping wrapper with a visually equivalent layout container makes the same controls return a complete tree.

Successful output after that single substitution included:

text Input
button Writing Tools
scroll area
    text entry area (settable)
    scroll bar

No AX children were hidden, combined, replaced with a proxy, or removed.

Related affected structures

The same substitution was needed for several complex dynamic sections containing combinations of:

  • represented AppKit text/scroll views;
  • nested scrollable content;
  • dynamically generated pipeline controls;
  • graph/canvas content;
  • segmented diff/output content.

This does not mean every GroupBox is broken. Simple groups containing ordinary SwiftUI content continued to work. The narrower common pattern is semantic grouping around a mixed or deeply dynamic accessibility subtree.

Full-tree controls after the workaround

Two independently built variants were tested.

Variant A:

AX nodes:       165
AX text:        11,064 characters
History rows:   54
Screenshot:     returned
New helper crash: no

Variant B:

AX nodes:       209
AX text:        20,383 characters
History total:  250 records
Screenshot:     returned
New helper crash: no

The returned trees included the large history, AppKit-backed input editor, dynamic pipeline/graph controls, output/diff controls, inspector content, and their interactive descendants.

Interpretation

This is not simply a response-size failure: the failing isolated subtree was much smaller than the successful complete trees.

The result strengthens the conclusion that the trap occurs in the helper's accessibility-tree transformation or invalidation logic. It does not appear to require a screenshot failure, target-app crash, missing permission, duplicate installation, or exact-path routing.

The application-side grouping-to-layout substitution is only a workaround. Equivalent SwiftUI AX topologies are valid and may occur in unrelated applications. The helper should revalidate collection indices/tree revisions, rebuild from a fresh snapshot, or skip the unsupported subtree with a controlled warning instead of trapping in Array.remove(at:).

Cross-reference differential

I read the full issue bodies and available comments for the related open reports below. They share the broad AppShot/Computer Use surface, but not all share this crash mechanism:

  • #32293 — same failure class. EXC_BREAKPOINT / SIGTRAP during SwiftUI AX transformation, native pipe closure, and later disassembly showing an attempted collection operation at index 5 with count 4. Its controlled routing and duplicate-installation checks also rule out those conditions as necessary causes.
  • #28933 — same topology-sensitive class. A minimal SwiftUI Form / Section / Toggle / Stepper / LabeledContent hierarchy triggers a helper SIGTRAP, supporting the conclusion that valid but specific semantic container structures can expose the transformer defect.
  • #38760 — different lifecycle defect. A desktop-managed helper spawn storm exhausts LaunchServices and can escalate to desktop OOM or a WindowServer watchdog panic. Its on-demand bundled path can remain stable; it does not report this isolated AX-child bounds trap.
  • #38003 — different startup/packaging defect. Intel builds hit a 250 ms native-pipe handshake timeout and then lack a managed helper payload. The service fails to initialize before accessibility traversal.
  • #35770 — different screenshot handoff defect. AX text and PNG generation succeed, but the desktop completes with completed_without_screenshot, apparently during temporary-file URL conversion or cleanup.
  • #34788 — different mode/session-state defect. AppShots work in Work mode but become unavailable in Chat mode after focus/background transitions; no helper SIGTRAP or AX-transform crash is reported.
  • #34296 — symptom-only report. The hotkey produces no result and provides no crash receipt or layer-specific evidence, so it cannot currently be classified as the same bug.
  • #20683 — related traversal safety goal but different crash signature. It reports EXC_BAD_ACCESS / SIGBUS and explicit stack exhaustion from excessive recursion, rather than this deterministic EXC_BREAKPOINT / SIGTRAP collection-bounds failure.

The shared product requirement across these reports is graceful, diagnosable failure. For this issue specifically, the actionable fingerprint remains: valid SwiftUI AX topology → transformation/invalidation → out-of-bounds collection mutation → SIGTRAP → native pipe closure.

UI symptom and underlying service error were the same capture attempt

The failure was observed at two layers:

  • In the desktop UI, the user saw the AppShot attachment error: Unable to attach appshot.
  • Through the underlying Computer Use API for the same target state, get_app_state returned: Sky Computer Use native pipe closed before response.
  • A fresh helper crash receipt then confirmed EXC_BREAKPOINT / SIGTRAP in the accessibility-transformation path.

Therefore the UI attachment error in this reproduction was the presentation-layer consequence of the helper crashing before it could return a complete AppShot payload. It was not merely a visual-capture failure.

This distinction matters for #35770: that report reaches screenshot and AX updates, creates valid PNG files, and only later settles as completed_without_screenshot. Here, the helper itself terminates during AX transformation, so the desktop has no completed payload to attach even though both cases display a similar user-facing attachment error.