macOS: execution error: System Events got an error: osascript is not allowed assistive access. (-1728)
A script using System Events to click/type needs Accessibility permission for the app running it.
osascript is not allowed assistive accessSystem Events got an error: osascript is not allowed assistive access. (-1728)is not allowed assistive access (-25211)Application isn't running. (-600) System Eventsexecution error: System Events got an error: osascript is not allowed to send keystrokes. (1002) Meaning
Add the host app (Terminal, iTerm, Script Editor, VS Code, Alfred, your automation tool) in System Settings → Privacy & Security → Accessibility, toggle on, and restart it. The error numbers (-25211, -1719, 1002) all mean the permission is missing.
Common causes
- Host app lacks Accessibility permission
- Permission toggled but app not restarted
- App moved/re-signed
- Running through ssh (no GUI permission)
- MDM restriction
⚡ Quick fix
- Enable the app under Accessibility and relaunch it
- Remove and re-add the entry if it's stuck
- Avoid GUI scripting over SSH sessions
Detailed fix by platform
macOS
tccutil reset Accessibilityclears stale entries
How to diagnose
- App — Listed under Accessibility?
- Toggle — On?
- Session — GUI session?
🔧 Still not fixed?
Many errors look alike. If the steps above didn’t solve it, one of these is probably what you’re facing:
Similar errors
- Camera/Microphone access denied (TCC) macOS: avfoundation: Could not start capture / "Terminal" does not have access to the camera or microphone — tccd denied
- Homebrew Cask: It seems there is already an App at Homebrew: Error: It seems there is already an App at '/Applications/Chrome.app'
- Homebrew: No available formula with the name Homebrew: Error: No available formula with the name "x". Did you mean ...?
Most viewed in macOS
- is damaged and can’t be opened macOS: “App” is damaged and can’t be opened. You should move it to the Trash.
- Operation not permitted (macOS privacy) macOS: Operation not permitted — Terminal/app lacks Full Disk Access (TCC privacy protection)
- zsh: command not found: brew macOS: zsh: command not found: brew (Homebrew not on PATH on Apple Silicon)
Other ways to find it
Where this error sits
Origin: Platform & cloud. Errors that are often confused with or caused by this one (click to open):
🧠 Still stuck? Analyze your error
Paste the full message, response headers or stack trace — we'll detect the platform and point to the most likely cause.
💬 What worked for others
No tips yet — did something else fix this for you?
Share what worked for you
Tips are checked by an editor before they appear. Links are removed.
Report a correction or suggest an improvement
Last updated 5 Nov 2026