This is going to be a bit of a vague question, just hoping that it might ring bells for somebody.
If I trigger some processing from a button on my plugin’s panel and call recordAction at the start of that processing it works just fine.
If I do the same thing, but trigger it from a button on a modal dialog then it’s much less reliable. I can start creating a new action in exactly the same way, and the requested processing on the image completes, but when it fails nothing appears for this processing step in the action that’s being built up.
It works occasionally, and works more often when I’m stepping through the code in a debugger. When it fails in the debugger there is nothing to indicate a failure; the code is in a try/catch and nothing is getting caught.
The debugger issue suggested a timing issue to me, but I’ve double-checked all the async/await. I’ve also tried the dialog close command both before and after calling recordAction.
I’ve tried in Photoshop 25.2 and 25.12, which seem to be the same.
Any suggestions very welcome!