I haven’t found any kind of observable logic to why or when this pops up, but it feels like every other time I am wanting to undo something it is not working… which is annoying for an undo feature, to say the least.
Could you send us the app diagnostics (Help menu → Copy Diagnostics) and paste that here or in a private message (click my profile picture → Message)?
This can often be caused by a plug-in that messes with some internals. The diagnostics contain which plug-ins are installed and which software versions, so that helps a bit reproduce the issue. And if you can remember the last few actions before the undo problem appeared, that can be helpful to trace the issue to its source.