A little more info.
The plugin which saves the AI files can be interupted by the other plug-in or not depending on user settings.
I checked the "undo context" in both cases.
When the plugin is NOT interupted, it DOES allow undochanges() and it's running in "silent" mode.
When the plugin IS interupted, it does NOT allow undochanges() and it seems to be running in normal mode. Also if I set it to "silent" it does not fix the issue.