Computer Use helper SIGTRAPs while traversing a SwiftUI accessibility tree; AppShot cannot attach
Environment
- Codex desktop:
26.715.31925(build5551) - Computer Use helper:
com.openai.sky.CUAService, version26.715.1000451(build1000451) - 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
- Open a native SwiftUI macOS app using
NavigationSplitView, a large sidebar, scrollable detail content, and anAVPlayerView. - Call
get_app_state; the first call can succeed and return a normal screenshot plus accessibility tree. - Select another sidebar destination.
- Call
get_app_stateagain. - The native pipe closes and a new helper crash report is written.
list_appsrecovers after the helper restarts, while anotherget_app_stateagainst 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_appssucceeds 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.
1 Comment
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_stateobservation failed with:Confirmed crash reports contained:
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:
The represented view returns an
NSScrollViewcontaining anNSTextView.The text view itself is not sufficient to trigger the failure:
Successful output after that single substitution included:
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:
This does not mean every
GroupBoxis 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:
Variant B:
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:
EXC_BREAKPOINT / SIGTRAPduring 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.Form/Section/Toggle/Stepper/LabeledContenthierarchy triggers a helperSIGTRAP, supporting the conclusion that valid but specific semantic container structures can expose the transformer defect.completed_without_screenshot, apparently during temporary-file URL conversion or cleanup.SIGTRAPor AX-transform crash is reported.EXC_BAD_ACCESS / SIGBUSand explicit stack exhaustion from excessive recursion, rather than this deterministicEXC_BREAKPOINT / SIGTRAPcollection-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:
Unable to attach appshot.get_app_statereturned:Sky Computer Use native pipe closed before response.EXC_BREAKPOINT / SIGTRAPin 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.