osascript is not allowed assistive access (-1719/-25211) macOS Origin: Platform & cloud Last updated 5 Nov 2026

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.

Exact message you may see 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)
Seen on: macOS

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

  1. Enable the app under Accessibility and relaunch it
  2. Remove and re-add the entry if it's stuck
  3. Avoid GUI scripting over SSH sessions

Detailed fix by platform

macOS

  1. tccutil reset Accessibility clears stale entries

How to diagnose

  1. App — Listed under Accessibility?
  2. Toggle — On?
  3. 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:

Where this error sits

Origin: Platform & cloud. Errors that are often confused with or caused by this one (click to open):

Camera/Microphone access denied (TCC) — macOS: avfoundation: Could not start capture / "Terminal" does not have access to the camera or microphone — tccd denied (macOS)Camera/Microphone acc…Homebrew Cask: It seems there is already an App at — Homebrew: Error: It seems there is already an App at '/Applications/Chrome.app' (macOS)Homebrew Cask: It see…Homebrew: No available formula with the name — Homebrew: Error: No available formula with the name "x". Did you mean ...? (macOS)Homebrew: No availabl…Not authorized to send Apple events to x (-1743) — macOS: execution error: Not authorized to send Apple events to System Events. (-1743) (macOS)Not authorized to sen…Screen recording permission required — macOS: could not create image from display / "Terminal" would like to record this computer's screen / screencapture: cannot capture without permission (macOS)Screen recording perm…Your Command Line Tools are too outdated — Homebrew: Error: Your Command Line Tools (CLT) are too outdated. Update them from Software Update / Please update to the latest macOS (macOS)Your Command Line Too…zsh: bad CPU type in executable — macOS (Apple Silicon): zsh: bad CPU type in executable: ./tool (macOS)zsh: bad CPU type in …osascript…

Explore the map of this error Full error map →

🧠 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.