Alt-Space trigger stops working until engine is restarted or macro disabled then reenabled

I am using the following macro to trigger Alfred on a remote Mac but not the local one when Screen Sharing is active:

The macro works very well, except every 1-4 days or so, Keyboard Maestro stops responding to the Alt-Space trigger (i.e., the system behaves as if either the macro did not exist or KM was not running), but all my other KM macros seem to continue to work fine. If I either restart the KM engine or just disable and reenable that particular macro, everything is back to normal again for some time.

I have l bunch of other KM macros with hot key triggers, but I don't remember any of them ever stopping to respond to their respective trigger. Is there something special about Alt-Space that would explain this bug?

You cannot safely simulate a key that is also the hot key trigger for a macro. The results will be unpredictable.

Instead, create a macro group that is active only when Screen Sharing is not at the front and place your Option-Space macro in there, unconditionally executing the AppleScript.

Thank you for the swift response. I had a bunch of other macros that also simulated the same keyboard shortcut as their respective hot key, and those never seemed to have any issues, which is why I thought there was something special about Alt-Space.

Anyway, I have followed your advice and am using macro groups now instead. Thanks again!