Common errors
Accessibility permission denied
Error message:1
Open System Settings
2
Add your terminal
Click the + button and add:
- Terminal.app
- iTerm.app
- VS Code
- Your IDE
3
Restart your terminal
Quit and relaunch your terminal completely for permissions to take effect.
4
Test access
App not found
Error message:Check running apps
Check running apps
Launch the app first
Launch the app first
agent-native’s
open command launches apps if they’re not running:Use bundle ID
Use bundle ID
If the app name is ambiguous, use the bundle ID:Find bundle IDs with:
Check case sensitivity
Check case sensitivity
App names are case-insensitive, but try exact capitalization:
Ref not resolving
Error message:- You clicked a navigation element (changed pane/view)
- App loaded new content
- A modal opened or closed
- Window was resized
Element not found
Error message:1
Check if element exists
2
Check interactive-only flag
The
-i flag filters to interactive elements. Try without it:3
Increase depth
Default depth is 8. Some deep elements need more:
4
Wait for element to appear
Elements may load asynchronously:
5
Use find command
Element not responding
Error message:Check if element is enabled
Check if element is enabled
false, the element can’t be interacted with.Inspect element attributes
Inspect element attributes
AXEnabled: Should betrueActions: Should includeAXPressor relevant actionAXPosition: Element should be on-screen
Try alternative action
Try alternative action
Wait for element to be ready
Wait for element to be ready
Timeout waiting for element
Error message:Increase timeout
Increase timeout
Check if element exists
Check if element exists
Take a snapshot to see what’s actually there:
Verify filter criteria
Verify filter criteria
Your filters might be too specific:
Check page/pane loaded correctly
Check page/pane loaded correctly
Debugging techniques
Capture full snapshots
When debugging, capture the full tree without filters:Use JSON output for parsing
Compare snapshots
See how UI changes between actions:Use screenshots for visual debugging
Inspect element details
- Role and subrole
- All attributes (title, label, value, etc.)
- Available actions
- Position and size
- Enabled/focused state
Test commands incrementally
Build complex workflows step by step:Enable verbose output
While agent-native doesn’t have a verbose flag, you can wrap commands in debug scripts:Performance issues
Snapshots are slow
Cause: Deep trees with many elements take time to traverse. Solutions:Limit depth
Limit depth
Use compact flag
Use compact flag
Remove empty structural elements:
Use interactive-only flag
Use interactive-only flag
Always use
-i to filter to interactive elements:Use filter-based commands
Use filter-based commands
Skip snapshots when you know what you’re looking for:
App becomes unresponsive
Cause: Too many rapid commands can overwhelm the app. Solution: Add delays between commands:Platform-specific issues
macOS version compatibility
Issue: Some features require macOS 13+. Check version:Accessibility API changes
Apple occasionally changes Accessibility APIs between macOS versions. Solution:- Update agent-native to the latest version:
- Check for known issues on GitHub
Getting help
Check GitHub Issues
Search for similar problems and solutions
Run tests
Verify your installation:
Check accessibility
Use macOS Accessibility Inspector:
- Open Xcode
- Xcode > Open Developer Tool > Accessibility Inspector
- Inspect app elements manually
File a bug
Include:
- agent-native version (
agent-native --version) - macOS version (
sw_vers) - Full error message
- Minimal reproduction steps
Quick reference
Essential debugging commands
Common error patterns
Next steps
System Settings guide
Learn System Settings automation patterns
Electron apps guide
Automate Slack, Discord, VS Code
Safari automation
Interact with web content
API reference
Complete command reference