agent-desktop on macOS
Read the core skill first (
agent-desktop skills get desktop
) for the observe, act, verify loop. This skill covers only what is different on macOS. Symptoms and fixes are in
references/troubleshooting.md.
Requirements
- macOS 13 or later, Intel or Apple Silicon.
- Accessibility permission for the app that launches agent-desktop (Terminal, iTerm2, Warp, VS Code, Codex). macOS 27 and later name this list Device Control and Data Access. If System Settings lists the binary separately, grant it too.
- Screen Recording permission, only for and for
session start --screenshots
artifacts.
- Automation permission for System Events, only where a command reports it missing.
First contact
- Run
agent-desktop permissions
.
- If a permission is denied, run
agent-desktop permissions --guide
. It opens the correct System Settings page with a panel that shows the user which app to drag into the list. The user confirms with Touch ID or a password, and the panel moves to the next missing permission by itself. The command returns at once with , or . agent-desktop permissions --request
shows the system prompts instead.
- If the guide cannot run, open System Settings > Privacy & Security > Accessibility (Device Control and Data Access on macOS 27 and later). Add the launching app and turn it on.
- Run
agent-desktop permissions
to confirm . The next agent-desktop call sees a new grant, so the launching app does not need a restart.
- Run
agent-desktop snapshot -i
to confirm. It reads the focused app. returns when Finder has no open window.
does not prompt.
can prompt, including for Automation.
does not prompt and covers Accessibility and Screen Recording only. Automation reports
when macOS would need to prompt.
What differs on macOS
Headed is physical first for
,
,
,
and
. Core focuses the exact window of the ref. The adapter then sends a real click, key or wheel event to the verified point.
,
,
,
,
,
,
,
and
stay semantic under
. Double-click, triple-click,
and
need
. Raw
input never changes focus.
Judge delivery by observation. AX return codes do not prove an effect. Finder returns success from an
that does nothing. Snapshot again or use
and
to check the result.
Surfaces. Use
for File, Edit and View menus and for menu bar apps (status items). While a menu, sheet, alert or popover is open, refs from the window tree behind it are the wrong target.
Menus. headless uses
. If the menu opened but the app returned
with
, do not retry. Inspect the menu with
. For combo boxes and menu buttons, use
.
needs a closed-to-open menu transition, so dismiss any open menu first.
Notification Center. The notification commands drive Notification Center through accessibility, with the rules in the core
reference. When agent-desktop opens the center, it closes it afterwards and restores the previous app focus. Pass both
and
on a single dismiss or action, because the stack shifts. Use
wait --notification --app "App"
for banners that vanish before you list them.
Chromium and Electron. agent-desktop switches on the web accessibility of a Chromium renderer automatically when it needs it. For a dense running app, use
snapshot --skeleton -i --compact
, then drill with
.
Identity. accepts a display name (
) or a bundle ID (
com.apple.systempreferences
). Other commands take the display name through
. Window IDs such as
stay valid for the life of the window. Find them with
.
Keys. The primary modifier is
:
,
. Quit shortcuts such as
,
,
,
and
return
unless you pass
. To quit an app, use
. Punctuation keys work in combos, as the symbol (
) or by name (
,
,
,
,
,
,
,
,
,
,
). Each one is sent with the key that types it in the active keyboard layout, so
opens Settings on ANSI and JIS keyboards alike.
Cursor overlay. draws the agent cursor in a click-through window. It never moves the OS pointer or activates an app. The macOS motion and image limits are in the core
reference.
Next step
When a command fails, find the symptom in references/troubleshooting.md.