I have an AppleScript app (~/Library/Scripts/ChooseLanguage.app) that I want to trigger with Alfred. The app opens a dialog for me to select a language, and then enables my Typinator rule sets for the language I chose, and disables rule sets for other languages. Next it changes my keyboard layout ("input source") to the chosen language. This second step requires that I give it permission in System Preferences → Security & Privacy → Privacy → Accessibility to enable it to run.
If I trigger the app manually, it has no problem using the permission I've granted it. But if I trigger it from Alfred, I get a message that it does not have adequate permissions:
It very clearly is allowed assistive access, as is Alfred itself. This therefore appears to be a bug with how Alfred triggers it. The problem occurs whether I use a hotkey or keywords to trigger the AppleScript.