[BUG] Computer Use: all clicks blocked by Dock layer-20 hit-test surface on macOS 26.4/26.4.1 (regression from pre-26.4)
Preflight Checklist
- [x] I have searched existing issues — see #42153 for the same symptom, filed 2026-04-01, still open, zero comments/labels/PRs. This report adds the CG window signature, regression timing, a proposed filter rule, and a third-party-interference exclusion.
- [x] This is a single bug report.
- [x] I am using the latest version of Claude Code (2.1.114) and Claude Desktop (1.3109.0).
What's Wrong?
On macOS 26.4 / 26.4.1, every pixel-coordinate click from computer-use (left_click, right_click, double_click, triple_click, computer_batch with any click action) is rejected with:
Click at these coordinates would land on "程序坞", which is not in the allowed applications. Take a fresh screenshot to see the current window layout.
This happens at every coordinate on the display, regardless of:
- which app is frontmost (verified with
System Events frontmost=Mail, still blocked); - which apps are granted (Mail at tier
full, still blocked); - whether Stage Manager is on or off (toggled both ways, no effect);
- whether
com.apple.WindowManager HideDesktop/EnableStandardClickToShowDesktop/ anyEnable*HotKeyis toggled; - whether Dock is respawned (
killall Dockre-creates the offending window immediately); - whether specific third-party overlay apps are quit (tested with Atoll, Ice, superwhisper — no effect).
request_access for "Dock", "程序坞", or com.apple.dock returns not_installed, so the user cannot grant their way out. Keyboard tools (key, type, scroll, hold_key) continue to work. screenshot, request_access, open_application, list_granted_applications, cursor_position all work. Only pixel-coordinate clicks are blocked.
Root cause (verified via CGWindowListCopyWindowInfo)
On macOS 26.4+, Dock.app owns a structural, non-interactive, full-display tracking window at CGWindow layer 20:
kCGWindowOwnerName = 程序坞 (com.apple.dock, pid N)
kCGWindowNumber = <fresh every Dock launch>
kCGWindowLayer = 20 ← ABOVE layer-0 app windows
kCGWindowBounds = (0, 0, Wpx × Hpx) ← covers the entire display
kCGWindowName = "" (no title)
kCGWindowAlpha = 1
kCGWindowSharingState = 0 (kCGWindowSharingNone)
The MCP's pre-click gate walks the CG Z-order top-down and attributes the click to whichever app owns the topmost window at that pixel. On 26.4+, every pixel's topmost window is this Dock layer-20 surface, so every click resolves to "Dock" and is refused. The surface is invisible in MCP screenshots because kCGWindowSharingState=0 excludes it from capture — the user sees a normal-looking app while every click errors.
This surface is structural to the macOS 26 Dock, not something created on demand or triggered by a user setting. It's created on every Dock launch (killall Dock respawn test produces the identical window as window #N+1, same layer 20, same sharingState=0, same empty title, same full-display bounds) and persists across all toggle permutations of com.apple.WindowManager I could find. The Dock startup log shows com.apple.dock.fullscreen and com.apple.dock.spaces XPC services activating immediately at launch — this is the canvas those subsystems animate into.
Ruled out — not caused by a third-party app
vmmap <Dock pid>— no non-Apple dylibs loaded into Dock.- Dock process env — no
DYLD_INSERT_LIBRARIES/DYLD_*injection. systemextensionsctl list— only network extensions (Loon, Tailscale, Surge), none UI-touching.- Enumerating every
layer ≥ 1window with CGWindowList — only system-owned windows (Dock, Window Server Menubar, Control Center, Stage Manager daemonWindowManager) touch the click coordinates; no third-party window does. - Individually quitting suspected overlay apps (Atoll, Ice, superwhisper) — zero effect on the Dock layer-20 surface.
- Ice uses private
CoreMenuExtraAPIs for menu-bar management only. CleanMyMac FinderSync touches Finder only. ToDesk/Loon/Surge/Tailscale are network-only. Paste/Easydict/Amphetamine/TG Pro/Immersive Translate are menu-bar floating widgets.
What Should Happen?
Clicks within a granted application's window should succeed. The MCP's pre-click pixel hit-test must not attribute a click to a Dock-owned non-interactive tracking surface on macOS 26.4+.
Error Messages/Logs
Click at these coordinates would land on "程序坞", which is not in the allowed applications. Take a fresh screenshot to see the current window layout.
Reproduces identically for every coordinate on the display, including those provably inside a granted app's bounds per a fresh screenshot call.
Steps to Reproduce
- On macOS 26.4 or 26.4.1, open Claude Code (or Claude Desktop).
- Enable the
computer-useMCP server. mcp__computer-use__request_access({ apps: ["Mail"], reason: "..." })→ granted at tierfull.mcp__computer-use__open_application({ app: "Mail" })→ Mail comes forward.mcp__computer-use__screenshot()→ Mail is visible, occupies the full display except the menubar.mcp__computer-use__left_click({ coordinate: [100, 400] })— coordinates unambiguously inside Mail's window per the screenshot.- Observed: error
Click at these coordinates would land on "程序坞", which is not in the allowed applications. mcp__computer-use__request_access({ apps: ["com.apple.dock"] })→not_installed, so no user-side workaround exists.
Independent verification that the hit-test is the cause (run this in any terminal on macOS 26.4+):
// swift /tmp/probe.swift
import Cocoa
let info = CGWindowListCopyWindowInfo(.optionOnScreenOnly, kCGNullWindowID) as? [[String:Any]] ?? []
for w in info {
let layer = w[kCGWindowLayer as String] as? Int ?? 0
let owner = w[kCGWindowOwnerName as String] as? String ?? ""
if layer == 20 && (owner.contains("Dock") || owner.contains("程序坞")) {
print(w)
}
}
// → one hit: full-display bounds, sharingState=0, title="", alpha=1
Claude Model
Not applicable — this is a tool-level bug in the computer-use MCP's hit-test gate. Any model that calls left_click hits it.
Is this a regression?
Yes, this worked in a previous version.
Last Working Version
Worked for this user on pre-26.4 macOS builds (macOS 26.3.x / earlier) with earlier Claude Code releases. Broken after upgrading to macOS 26.4.1 on 2026-04-12 (confirmed via system_profiler SPInstallHistoryDataType). The window-server/Dock changes in the 26.4 → 26.4.1 branch are the trigger — the current /System/Library/CoreServices/Dock.app binary mtime is 2026-04-06, consistent with ship in 26.4.x.
Community observation: macOS 26 Tahoe reworked the Dock's in-process window-management stack (the Dock process now hosts WindowManager preferences and the com.apple.dock.fullscreen / com.apple.dock.spaces XPC services) and added new Dock-owned surfaces that did not exist on pre-26.4 builds. The same CG signature (sharingState=0, memoryUsage=2368) on Tahoe windows is independently documented in trycua/cua#870 and trycua/cua#912 — those issues concern screen capture in Tahoe VMs but confirm the same Dock/compositor behavior pattern.
Claude Code Version
2.1.114 (Claude Code) — also reproduces in Claude Desktop 1.3109.0 (both use the same computer-use MCP implementation).
Platform
Anthropic API
Operating System
macOS
Terminal/Shell
iTerm2 — but this reproduces regardless of terminal, because the bug is in the computer-use MCP's hit-test gate, not in the CLI shell. Also reproduces in Claude Desktop (no terminal involved).
Additional Information
Full environment
- macOS: 26.4.1 (Darwin 25.4.0), Build 25E253, Apple Silicon
- Claude Code CLI: 2.1.114
- Claude Desktop: 1.3109.0
- System install history relevant dates:
- 2025-09-24 — original macOS 26.0 install
- 2026-03-31 — macOS 26.4
- 2026-04-12 — macOS 26.4.1 (current)
- 2026-04-17 17:39 — last reboot
- Dock.app mtime: 2026-04-06 (ships with 26.4.x)
- Stage Manager: off (
GloballyEnabled=0,GloballyEnabledEver=1) - Relevant WindowManager flags tested:
HideDesktop=0,EnableStandardClickToShowDesktop=0, allEnable*HotKeydefaults - Hot corners: only
wvous-br-corner = 14(Quick Note) - Dock autohide: 0 (off), magnification on, Chinese locale (zh_CN)
Proposed fix (MCP-side, ~4 lines)
When walking the CGWindow Z-order top-down to determine the target of a click, skip a window if all of the following hold:
kCGWindowOwnerName/kCGWindowOwnerPIDresolves tocom.apple.dock; ANDkCGWindowBoundsequals the current display bounds; ANDkCGWindowSharingState == kCGWindowSharingNone(value0); ANDkCGWindowNameis empty or missing.
This filter is specific enough to not false-match any legitimate Dock click target:
- The Dock strip itself is at a different layer/bounds (small strip at screen edge, not display-sized).
- The Dock's Wallpaper windows are at the most-negative layer and have
sharingState=1(observed: both Dock wallpaper windows on my machine aresharing=1). - Dock menus (trash, folder stacks) are at different layers and have non-empty window names.
So the filter cleanly excludes only the structural tracking surface.
Alternative fix (more robust)
Replace CG-Z-order hit-testing with AXUIElementCopyElementAtPosition rooted at the frontmost granted app. This resolves click target via the accessibility hierarchy, which reflects the app that will actually receive the click's OS-level mouse event. The accessibility API does not expose the Dock's non-interactive tracking surface as a hit element for a user click, so it is immune to this class of false positive.
Interim workaround for end users blocked by this
- Keyboard navigation only:
cmd+F/cmd+Kfor in-app search, arrows / tab for navigation,return/spaceto confirm,typefor text input. All bypass the pixel hit-test. - No effective system-side workaround: no user-toggleable macOS setting removes the Dock layer-20 surface on 26.4+.
Cross-references
- #42153 — earlier report of the same symptom on Tahoe, state
open, 0 comments, 0 labels, 18 days untriaged. This report supersedes it with a concrete CG signature, regression timing, and a proposed filter rule. trycua/cua#870,trycua/cua#912— independent documentation of the same Tahoe CGWindow signature in a competing Computer Use product; corroborates that this is a macOS 26 change, not a Claude-side regression alone.
7 Comments
Update — clean user-side workaround found (hide the Dock, or fullscreen)
Additional probing on the same machine (macOS 26.4.1, Darwin 25.4.0, Build 25E253) reveals that the Dock-owned layer-20 tracking surface is conditional on the Dock being visible, not absolutely structural. Hiding the Dock (or putting the target app in fullscreen) tears it down immediately and restores normal click behavior.
Self-correction of the original report
The original report said I had exhausted all relevant toggles before concluding the surface was structural. That was overclaimed: I tested every
com.apple.WindowManagerflag (HideDesktop,EnableStandardClickToShowDesktop,GloballyEnabled, theEnable*HotKeyfamily) but I had not testedcom.apple.dock autohide. Autohide resolves the issue.Workaround 1 — hide the Dock
Or: System Settings → Desktop & Dock → "Automatically hide and show the Dock" ON.
Before (
autohide=0) at coordinate (81, 313):After (
autohide=1), same probe:No positive-layer Dock window remains anywhere in
CGWindowListCopyWindowInfo(.optionOnScreenOnly, …). A subsequentmcp__computer-use__left_click({coordinate:[81,313]})returnsClicked.and the app responds normally. A second click inside the same Mail window at a different coordinate also succeeds. No session restart, no reboot, norequest_accessre-grant needed.Workaround 2 — fullscreen the target app
cmd+ctrl+for the green title-bar button. Each fullscreen app lives in its own Space where the Dock is suppressed, so the layer-20 surface is absent for that Space's duration. Clicks inside fullscreen Mail succeed identically (Clicked.at multiple tested coordinates).Verified in fullscreen via CG window probe — no
owner="程序坞" layer=20entry; the only Dock presence is its Wallpaper window for the new Space's UUID at the most-negative layer.Updated root-cause framing
The layer-20 full-display surface is Dock's hover / magnification / Mission-Control-entry hit region for the visible Dock strip. When the Dock is hidden (via autohide or because the frontmost app is fullscreen), Dock doesn't need the region and tears it down. That is consistent with it being a hit-test region rather than a render canvas, and with
kCGWindowSharingState=kCGWindowSharingNone— the region has no pixels to share, only a hit shape.MCP fix recommendation unchanged
The proposed ~4-condition filter (Dock-owned + display bounds +
kCGWindowSharingState=kCGWindowSharingNone+ empty title) still applies, because the majority of macOS users run with Dock visible and should not have to reconfigure system UI to use Computer Use. The workaround above is a stopgap, not a resolution.this pattern bit me last year on a macOS agent that used CGWindowListCopyWindowInfo for a pre-click hit-test gate. any invisible layer>=1 window with sharingState=0 becomes a silent click denier because it's in the z-order but not in the screenshot, so the model never sees what it's being blocked by. i ended up switching to AXUIElementCopyElementAtPosition for the allowed-app check instead, because the accessibility hit-test respects event-passthrough flags that CGWindowList completely ignores. Dock's full-display tracking surface is almost certainly passthrough for AX even when it shows up at layer 20 for CG. fixes the symptom without needing to diff structural Dock internals per macOS point release.
Surfacing @m13v's suggestion as the recommended fix path
Flagging @m13v's comment above for the Anthropic team's attention, since it cleanly supersedes the 4-condition CGWindowList filter I originally proposed:
Why this is the better fix:
sharingState=0becomes a silent click denier. Dock's layer-20 surface is just the first one we hit; Apple may ship more in future point releases.AXUIElementCopyElementAtPosition) is the same API path mouse events actually traverse, so it matches real click behavior by construction. No per-macOS-version heuristics required.sharingState=kCGWindowSharingNone+ empty title) would unblock this specific regression but leaves the class of bug open.Why the user-side workaround isn't a resolution:
Autohiding the Dock or fullscreening the target app does work (confirmed in my follow-up comment), but requiring end users to reconfigure system UI to use a shipped feature isn't viable for non-technical users, and fullscreen isn't always appropriate for the task (e.g., cross-app workflows, Finder drag-drop). The workaround is fine as a stopgap while the MCP server is patched; it shouldn't be the recommended long-term answer.
Happy to test a prerelease build of
computer-useif helpful.Independent visual confirmation of the trigger condition on macOS 26.4.1 (Build 25E253), Chinese locale.
I instrumented a Swift probe that polls
CGWindowListCopyWindowInfoevery 2s for 60s while a human user toggled between two macOS Spaces hosting the same app (Claude.app):Two transitions captured in real time, perfectly synced with the Space switch. The Wallpaper-
<UUID>tag flips at the exact same sample as the layer-20 surface appears/disappears. This is direct, reproducible evidence that the surface lifecycle is bound to the active Space's Dock-visibility state, not to global Dock settings or process restarts (Dock pid was unchanged across the entire run,autohide=falsethe entire run).Implication for the fix:
AXUIElementCopyElementAtPositionfix (m13v's comment above) is immune to this since AX hit-testing respects event-passthrough flags and is not Space-sensitive in the same way.Probe script (Swift, no external deps) and full session walkthrough available on request. Happy to test a prerelease build.
Confirmed still broken on macOS 26.5 / Claude Desktop 1.11187.4
macOS 26.5 (Darwin 25.5.0), Apple Silicon (MacBook), Claude Desktop 1.11187.4, computer-use MCP — same
com.apple.dockerror on every coordinate. The regression persists through at least 26.5.Workaround status on 26.5:
Both workarounds from @alexcz-a11y's follow-up hold on 26.5:
defaults write com.apple.dock autohide -bool true && killall Dock) → layer-20 surface disappears, clicks succeed.Note on the fullscreen workaround: do not interleave an MCP
left_clickwhile in fullscreen — it switches the active Space back to the main desktop and the next CGEvent click misfires or exits fullscreen. Use onlyscreenshot(read-only, safe) + CGEvent-synthesized HID clicks while in fullscreen.Growing scope:
Every new Mac shipped with Tahoe 26.4+ and every user who upgraded from pre-26.4 is now affected. The affected population grows daily — this is not a niche edge case. The
stalelabel understates urgency.Cross-reference: Anthropic support ticket 215474529678088 was opened and escalated to engineering — attaching here for tracking.
Still reproduces on macOS 26.5.1 — plus a second trigger surface (Notification Center desktop widgets) and a fully-working two-part workaround
Confirming the regression persists on the latest point release, and adding three new data points: the exact CG signature on 26.5.1, a second blocking surface beyond the Dock, and a cross-check against an AX-based implementation that works.
Environment
程序坞= Dock,通知中心= Notification Center,访达= FinderSymptom — identical to OP
Every pixel-coordinate click returns
Click at these coordinates would land on "程序坞", which is not in the allowed applications.screenshot,request_access,list_granted_applications,cursor_position, and all keyboard tools work; only clicks are refused. Verified independent of Accessibility/Screen-Recording grants (re-granted + relaunched), of display scaling (tested at 1× non-HiDPI — still fails), and of third-party input drivers (uninstalled Razer Synapse virtual HID + ToDesk — no change).CGWindowListCopyWindowInfoconfirms the layer-20 Dock surface, matching OP exactly:New: a second trigger surface — Notification Center desktop widgets
After applying the Dock-autohide workaround, clicks were still refused, but the owner changed from
程序坞to通知中心. This machine has two Notification Center widgets placed on the desktop; CGWindowList shows:So the CGWindowList pre-click gate is defeated by any desktop-level system surface, not just the Dock — desktop widgets are a second instance of the same root cause.
Workaround that fully restores clicking on this machine (both steps required)
defaults write com.apple.dock autohide -bool true && killall Dock— removes the layer-20 Dock surface once the Dock actually hides.With both applied, pixel clicks land correctly — verified end-to-end (Calculator: clicked
5, then+ 3 =, got8). Re-showing the Dock or re-adding a desktop widget brings the failure back immediately.Cross-implementation data point supporting @m13v's AX suggestion
OpenAI Codex's "Computer Use" clicks correctly on this same machine with no Dock/widget changes at all. It uses
AXUIElementCopyElementAtPositionfor its hit-test, which respects the event-passthrough flags these system surfaces set — consistent with the proposed fix of switching the allowed-app check fromCGWindowListCopyWindowInfoto AX hit-testing.Confirmed still broken on macOS 26.5 (Darwin 25.5.0) / Claude Code desktop app (Cowork) 2.1.177 — CGWindowList probe run at failure time reproduces OP's exact signature. Plus a new data point: the block is intermittent on the same machine with identical settings.
Environment: MacBook Pro (Apple M5), single built-in display 3024x1964 (logical 1512x982), zh-CN locale, Dock autohide OFF (
com.apple.dock autohideunset) the entire time, granted app: Microsoft OneNote (tier "full").Probe (OP's script, trimmed) run seconds after a rejected click:
At that moment the granted app was frontmost (System Events), its window on the active Space at exactly the frame above (matching the tool's screenshot after the ~1.102 image-to-points scale), and
left_click/scrollanywhere inside that frame returnedClick at these coordinates would land on "程序坞", which is not in the allowed applications. Keyboard tools kept working throughout (an entire multi-table OneNote document was typed during the block);mouse_movesucceeds;open_applicationreports success but does not recover.New data point — intermittency with no settings change: on this same machine, same session allowlist, pointer actions worked normally for a ~16-minute stretch in the afternoon (Dock visible, autohide off), then every pointer action was refused in sessions later that evening and again the next morning (probe above taken during the latter), with no reboot, no permission change, and no Dock/WindowManager settings change in between. This corroborates @xwx0807's finding that the layer-20 surface's lifecycle is dynamic (Space-bound): end users experience this as a nondeterministic failure — an agent clicks fine for one session, and hours later nothing clicks.
Two smaller observations that make this hard to debug from the agent side:
screenshotcomposites granted apps' windows — and excludes the sharing=0 surface, as OP noted — so the picture always shows a perfectly clickable frontmost app; the error's advice to "take a fresh screenshot" can never surface the blocker. Screenshots even composite granted-app windows that are on an inactive Space, so the image can differ from what the user is actually looking at.+1 to @m13v's
AXUIElementCopyElementAtPositionfix: at the rejected coordinates, the AX hierarchy (via System Events) reports the granted app's window frame containing the point, while CGWindowList resolves the same point to the Dock surface — exactly the divergence that fix targets. Until then, agent-side keyboard-only operation (app shortcuts + typing) is a workable stopgap that doesn't require users to change Dock settings.(Investigated and written by Claude Code at the user's request; posted from the user's account.)