Skip to content

fix(agent-isolation): show the macOS touch overlay even when activation is refused - #1697

Merged
potiuk merged 1 commit into
apache:mainfrom
potiuk:fix/touch-overlay-macos-activation
Oct 18, 2026
Merged

potiuk merged 1 commit into
apache:mainfrom
potiuk:fix/touch-overlay-macos-activation

Conversation

@potiuk

@potiuk potiuk commented Oct 18, 2026

Copy link
Copy Markdown
Member

What we are asking for

Please review and accept a small fix to tools/agent-isolation/gpg-touch-overlay-window-macos.py. The touch overlay now shows on macOS even when the system refuses to activate it.

Why

Since macOS 14 activation is cooperative, and activateIgnoringOtherApps: is deprecated. The watcher starts the overlay in the background, and macOS sometimes refuses to activate it. The window was then drawn but stayed behind the terminal, or on another Space when the terminal is full screen. The key waited for a touch nobody knew about, and the signature failed with agent refused operation. The watcher's debug trace showed it: overlay: viewable=1 geometry=2056x1329+0+0 app_active=False key_window=False. This was seen on macOS 26.

What changes

  • A new float_above_everything, called before activation is requested, puts each overlay window at NSPopUpMenuWindowLevel on every Space (CanJoinAllSpaces | Stationary | IgnoresCycle | FullScreenAuxiliary) with orderFrontRegardless. That is the one ordering call that works without being the active app. A refused activation now costs the keyboard, not the window.
  • Activation uses -[NSApplication activate] where it exists, falling back to activateIgnoringOtherApps: on older systems.
  • A structural test checks that the window is put in front before activation is requested. It fails without the fix.
  • isolated_fingerprint.py is regenerated by its hook.

Testing

The agent-isolation tests pass, and the new test fails on main. The prek hooks pass. The patched window was checked live on macOS 26 with real YubiKey signatures.


Was generative AI tooling used to co-author this PR?
  • Yes — Claude Code (Opus 5)

Generated-by: Claude Code (Opus 5)

…on is refused

Since macOS 14 activation is cooperative, and activateIgnoringOtherApps: is
deprecated: a window process the watcher starts in the background is
sometimes refused it. The overlay was then drawn but stayed behind the
terminal, or on another Space when the terminal is full screen, so the key
waited for a touch nobody knew was wanted and the signature failed with
"agent refused operation". The debug trace showed it plainly:
viewable=1 but app_active=False.

Generated-by: Claude Code (Opus 5)
@github-actions github-actions Bot added family:setup setup-* skills family:tools tools/* capability:platform Framework / agent substrate skills (install, verify, doctor, override, status, setup bootstrap) substrate:sandbox Tool substrate: agent isolation, egress control, settings audit labels Oct 18, 2026
@potiuk
potiuk merged commit 0d9c168 into apache:main Oct 18, 2026
11 checks passed
potiuk added a commit that referenced this pull request Oct 19, 2026
Hand-sync of tools/spec-loop/specs/ with the functionality that landed
between 43e4c6e and ccb53a3.

Specs changed:
- adapters: Gmail drafting through the gmail-plaintext MCP tools, not the
  CLI (93051d5, #1681); the Jira CLI's explicit --deployment and the
  tracker backends shipped as generated plugin copies (1cf5cee, #1683);
  local-tracker report files and folders created 0600 / 0700 (68ec4a3,
  #1700).
- agent-isolation-sandbox: agent-guard unwrapping env / command and
  refusing env -S (b00d4b5, #1691; 4aea234, #1694); the macOS touch
  overlay shown whether or not activation is granted (0d9c168, #1697);
  the sandbox-lint workflow refusing a tracked .claude/settings.local.json
  (51a610b, #1692) and sandbox-lint refusing the Gmail token path in
  allowRead (93051d5, #1681).
- vetted-command-surface: the spelling guard refusing a quoted ~, the right
  spelling behind env / command, and other spellings of the eval wrapper
  (b00d4b5, #1691).
- adoption-and-setup: the tracker-backend question on every first setup
  and the Jira label mapping and doctor gate (1cf5cee, #1683).
- .last-sync bumped to ccb53a3.

No spec change needed (specs already updated in the commit itself):
ccb53a3, 9a8ec5f, 9955d7d, c9f34cc, 76cc6e8, 1d773a8,
16014a2.

No functional change for the specs: d4b7dc3 (review-body wording),
77e8145 (test timing), 8d606d6 (eval fixtures), a04891f (the
previous sync).

Generated-by: Claude Opus 5
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

capability:platform Framework / agent substrate skills (install, verify, doctor, override, status, setup bootstrap) family:setup setup-* skills family:tools tools/* substrate:sandbox Tool substrate: agent isolation, egress control, settings audit

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant