@michael Thanks for reporting this issue to us. The automatic counting upwards of the session number while the software is left open is something we should certainly fix. I ended up posting on our ideas site below to make sure we record this request publicly. I’ve also linked your forum post there.
In the meantime, one workaround would be to close and re-open the application using your script to reset the session number (not a great and clean solution, unfortunately).
Something like…
with automation.Manager.launch() as manager:
…will automatically launch the software and close it once you exit the with
block.