Overview
macOS requires Accessibility permission for agent-desktop to read UI elements and perform actions. Without this permission, all commands will fail with aPERM_DENIED error.
Quick Setup
Trigger the system permission dialog
Run the permissions command to trigger macOS’s permission request dialog:A system dialog will appear asking you to grant Accessibility permission.
Open System Settings
If the dialog doesn’t appear, manually open System Settings:
- Open System Settings (System Preferences on macOS 12 and earlier)
- Navigate to Privacy & Security
- Click Accessibility in the sidebar
Add your terminal application
In the Accessibility pane:
- Click the lock icon at the bottom and authenticate
- Click the + button
- Navigate to
/Applications/Utilities/and select your terminal app:- Terminal.app (default macOS terminal)
- iTerm.app (iTerm2)
- Visual Studio Code.app (VS Code integrated terminal)
- Warp.app (Warp terminal)
- Click Open
- Ensure the checkbox next to your terminal is enabled
Manual Setup Path
If you prefer to set permissions manually without the trigger command:- System Settings → Privacy & Security → Accessibility
- Click the lock and authenticate
- Click + and add your terminal application
- Enable the checkbox
Troubleshooting
Permission denied error
If you see this error:- Verify your terminal application (not agent-desktop) is in the Accessibility list
- Ensure the checkbox is enabled
- Restart your terminal completely (quit and reopen)
- Run
agent-desktop permissionsto verify
Permission granted but commands still fail
Common cause: You granted permission to the wrong application.Make sure you added your terminal application, not
agent-desktop binary itself.- Open System Settings → Privacy & Security → Accessibility
- Remove any incorrect entries (like
agent-desktopbinary) - Add your actual terminal application (Terminal.app, iTerm.app, etc.)
- Completely restart your terminal
- Test with
agent-desktop permissions
Using agent-desktop from different terminals
If you use multiple terminal applications, you must grant Accessibility permission to each one:- Terminal.app
- iTerm2
- VS Code integrated terminal
- Warp
- Any other terminal emulator
CI/CD environments
For automated environments:- Grant permission to the CI runner’s shell (bash, zsh, etc.)
- Or use
tccutilto programmatically grant permissions (requires Full Disk Access)
Checking Permission Status
Use thestatus command to see full system information including permissions:
Why Accessibility Permission?
agent-desktop uses macOS’s Accessibility API (AXUIElement) to:- Read UI element hierarchies (accessibility trees)
- Perform interactions like clicks, typing, and focus changes
- Query element properties (role, name, value, state)
- Screen readers (VoiceOver)
- Automation tools (Keyboard Maestro, BetterTouchTool)
- Password managers (1Password, Dashlane)
Next Steps
Once permissions are granted, you’re ready to use agent-desktop:Quick Start
Learn the snapshot → act → snapshot workflow
Commands Overview
Explore 50+ available commands