[BUG] Claude Desktop: computer_use.node blocks main thread indefinitely on iCloud/OneDrive-evicted app bundles (performSpotlightQuery callback)

Open 💬 2 comments Opened Jun 26, 2026 by egulser

Environment

  • Claude Desktop: 1.15962.0 (same stack confirmed in 1.15200.0)
  • macOS: 26.5.1, Apple M4
  • Built-in computer_use.node (\"Control your Mac\" capability)

Summary

InstalledAppsCache.performSpotlightQuery() registers an NSMetadataQuery result
callback on the main thread RunLoop. When Spotlight returns results, the callback
calls -[NSBundle localizedInfoDictionary] synchronously for every found .app bundle.
If any bundle is an iCloud or OneDrive dataless placeholder (cloud-evicted), the kernel's
apfs_materialize_dataless_file_ext → lck_mtx_sleep blocks the main thread indefinitely.
The entire app UI freezes with no timeout or recovery path.

Reproduction Conditions

  1. iCloud Desktop & Documents sync enabled (common default on new Macs)
  2. Any .app bundle placed in a synced folder (e.g. ~/Documents/SomeApp.app)
  3. macOS evicts that bundle to a dataless cloud placeholder
  4. Claude Desktop launches → Spotlight query fires → callback tries to read evicted bundle → hang

Also reproduces with OneDrive-synced folders containing .app bundles.
Orphaned placeholders (cloud copy deleted, local placeholder remains) cause permanent hang —
materialization never completes.

Stack Trace (macOS .hang spindump, Thread 0)

Thread 0  DispatchQueue "com.apple.main-thread"(1)  Thread name "CrBrowserMain"
41/41 samples | last ran 415s ago | cpu <0.001s

-[NSApplication run]
  CFRunLoopRun / __CFRunLoopDoBlocks
    -[NSMetadataQuery _noteNote4:]                 ← Spotlight result callback, MAIN THREAD
      InstalledAppsCache.performSpotlightQuery()   ← computer_use.node (Swift)
        -[NSBundle localizedInfoDictionary]         ← synchronous file I/O on main thread
          apfs_materialize_dataless_file_ext        ← kernel materializing cloud placeholder
            lck_mtx_sleep                           ← blocked indefinitely (415s observed)

Notes

  • NSMetadataQuery itself is async (correct pattern), but the **result callback does

synchronous file I/O on the main thread** — that's the bug.

  • Bug persists across update from 1.15200.0 → 1.15962.0 (same stack, same behavior).

Expected Behavior

NSMetadataQuery result processing should be dispatched to a background queue with
per-bundle I/O timeout. Main thread must never block on localizedInfoDictionary for
arbitrary app bundles.

Workaround

Move all .app bundles out of iCloud/OneDrive-synced folders into local ~/Applications.
Exclude cloud folders from Spotlight (System Settings → Spotlight → Search Privacy).

View original on GitHub ↗

This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗