Loading page...Загружаем страницу...正在加载页面...
AtlasRepo

macOS TCC permissions for unattended AI agents: stop losing nights to hidden prompts

Description and use

By configuring TCC permissions once for a single terminal host, AI agents run unattended without silent failures, and a nightly health check ensures continued operation.

Problem

Unattended AI agents on macOS often fail silently because macOS TCC prompts block required permissions, causing agents to stop working overnight.

Outcome

By configuring TCC permissions once for a single terminal host, AI agents run unattended without silent failures, and a nightly health check ensures continued operation.

Workflow

  • Choose a single terminal app (e.g., iTerm) as the host for all AI agents.
  • Grant Accessibility permission to the chosen terminal app for tasks that click or type into other apps.
  • Grant Automation permission for each target app that osascript will control (once per target).
  • Grant Screen Recording permission for screenshot or screen reading tasks and relaunch the terminal after granting.
  • Grant Files and Folders permission for access to ~/Documents, Desktop, Downloads.
  • Grant Full Disk Access only if the agent needs Mail, Messages, Safari data.
  • Grant Input Monitoring permission for global hotkeys.
  • Trigger each permission prompt while watching the terminal by running sample osascript commands such as osascript -e 'tell application "System Events" to get name of first process' and osascript -e 'tell application "Finder" to get name of startup disk' and click Allow.
  • Perform a read‑only health check before bed: run osascript -e 'tell application "System Events" to get name of first process' > /dev/null 2>&1 && echo "automation OK" || echo "automation BROKEN" and screencapture -x /tmp/tcc-check.png && echo "screen OK" to verify permissions.
  • After macOS updates, if permissions appear broken, remove the app from the TCC list with the minus button, add it back, and relaunch the terminal.

Evidence

If you run AI agents unattended on a Mac ... you've probably woken up to find nothing happened overnight.

Source

TCC grants go to the app that launches the process, not to your script.

Source

Automation prompts only appear the first time an app tries to control a target.

Source

Updates and app re-signing can silently invalidate grants: the toggle still looks on, but it no longer applies.

Source

  • Record date: 2026-10-16T12:56:22.275Z