KM Engine is requesting to bypass the system private window picker and directly access your screen and audio

I have started to configure KM on an M4 MacMini running seqoia and I am running into issues with not being able to "click at found image" or capture image with a script it is failing silently or giving me this:
CleanShot 2025-05-16 at 15.16.34

Then when I click on open system settings, I already have both KBM and the Engine enabled:
CleanShot 2025-05-16 at 16.41.19

When I try to run the shell script action with the following I get nothing:

myTime=$(date +%d-%H%M%S); screencapture "'/Volumes/HOME/Users/myuser/Sync/shared/screenshot buffer/newmini/'$KMVAR_ssPicsDir$myTime $KMVAR_ssName.png"

The same happens in terminal, when I try to run the screencapture command, even though terminal is already enabled. I get the same propmpt pop-up to allow or open system preferences.

Seems like this is the issue, you get re-prompted every month now, but if this is running on a headless macmini... this does me no good.

Hopefully the plist work around will be there for a while.

and now you cannot use ls in the replayd folder. amnesia appears to not be working. This is quite frustrating to use on a headless mac.

Maybe the mac will no longer be a viable platform for my automation needs. Sad day

Your configuration is different from mine (I'm not using a headless Mac) but since I started that thread, I'd like to point out that it hasn't been a problem for me on my M3 iMac.

If the problem is that your Mac is headless, and macOS is acting specifically on that, (remember, it's not acting that way on an interactive iMac) maybe you can trick macOS into thinking it's not headless. Perhaps plugging in a monitor, printer, or some other peripheral (maybe a smart keyboard that occasionally sends a keystroke) might trick macOS. It's a long shot, but it could be worth trying.

It might also be a software issue. Perhaps you should enumerate all the software you have installed on that Mac.

I'm curious if you found other software on Windows that even compares I've searched for years but it's been a while. I'd love to hear the window solutions if you have some.

I have an M2 Pro Mac mini and an M4 MacBook Pro and am not running into this issue on the latest OS for both. I had that a few times but has been working just fine. I have had several permission issues on and off with various other softwares but knock on wood everything seems to be working right now.

You need to confirm every 30 days. You have KM. KM can run macros on a schedule. A macro can toggle buttons.

What happens if you run a macro every 25 days that toggles Engine permission off and on again?

You do? I don't have to.

Poster does. I don't keep count, I just OK the dialog every time it appears. It may have been supplanted by the "Keyboard Maestro Engine has viewed your screen..." nag Notification since my last "Allow".

And just to add...

IIRC -- last time I tested it, image detection was still working at the point the renewal dialog appeared. So you might be able to put some/all of your screen-cap shell script actions in Try/Catch blocks -- give them a short timeout and use the Catch to check for the permissions dialog and, if there, click the "Allow" and re-run the script action.

I was really worried about this and put off upgrading my OS for months hoping this 'feature' would be reversed. Eventually I couldn't put off upgrading any longer, but to my utter relief I haven't had to confirm permissions even a second time. I don't remember if I did anything to mitigate it in advance or not, though I do remember submitting feedback to Apple about it. Thinking about it now, I wonder if the difference is machines that were on older operating systems first versus machines fresh installed with the new OS.

Have you checked for updates to Amnesia and/or the plist workround?

Apple changed the format of the plist -- what was originally a single-line entry per app changed in macOS 15.1 to eg:

defaults read ~/Library/Group\ Containers/group.com.apple.replayd/ScreenCaptureApprovals.plist
{
    "com.stairways.keyboardmaestro.editor" =     {
        kScreenCaptureAlertableUsageCount = 1;
        kScreenCaptureApprovalLastAlerted = "2025-04-09 10:01:46 +0000";
        kScreenCaptureApprovalLastUsed = "2025-05-19 10:22:07 +0000";
        kScreenCapturePrivacyHintDate = "2025-04-09 10:01:46 +0000";
    };
}

...so any fix from macOS 15.0 needs to be updated to change both the LastAlerted and LastUsed dates.

Note that my last alert on this machine was more than 30 days ago...