Giving "Full Disk Access" to your shell (/bin/sh or /bin/bash) would work but it's a manual process you cannot script/automate (something fundamental when crafting a CI system for example).
A better solution is to move the files that need to be accessed/run by your daemons/agents to a location that is not ~/Documents, ~/Desktop etc. ~/bin for instance, works just fine.
Topic:
App & System Services
SubTopic:
Core OS
Tags: