How to fix LaunchAgent scandir: [Errno 1] Operation not permitted error?
The following worked!
I created an app using &quot;Script Editor&quot; that runs /usr/local/bin/borg-backup.sh using zsh.
do shell script &quot;zsh /usr/local/bin/borg-backup.sh&quot;

I then exported the app to /Applications/borg-backup.app clicking &quot;File&quot; then &quot;Export...&quot; choosing &quot;Application&quot; for &quot;File Format&quot;.
Finally, I updated ~/Library/LaunchAgents/local.borg-backup.plist.
&lt;key&gt;ProgramArguments&lt;/key&gt;
&lt;array&gt;
  &lt;string&gt;open&lt;/string&gt;
  &lt;string&gt;/Applications/borg-backup.app&lt;/string&gt;
&lt;/array&gt;

The first time the launch agent ran, a prompt asked me to grant borg-backup.app access to ~/Documents.