This is quite regular and I wonder if other people experience the same.
Sometimes when I run a macro, it doesn't run with the changes I made, unless I run it a second time.
For example I have a simple macro with a variable and I'm using the Search and Replace action, but when I make some change to the text that will replace the current string, it shows me the same thing as the one before the changes. When I run it a second time, them I am able to get the new changes (replacement).
This is not only happening with this action. I experience that with other actions as well.
It feels like KM gets stuck in the previous state and only updates when I run it a second time.
For example let's say the variable is
and I want to replace "Link" with "URL".
When I change the action from Link to URL, when I run the macro I get:
One possible explanation for this is that when you trigger the macro the first time, KM is in the process of saving your macros from the last edit. So it doesn't actually get triggered. This happens to me all the time. I just learn to live with it and recognize it when it happens.
One way to prove this is to open the KM Engine log and see if the macro actually triggered twice. Another way is to open the Debugger and see in the Debugger if the macro was actually triggered twice.
If neither of those things solve the problem, we may need to see your macro, especially the trigger.