Workflow execution strangeness
Hi I am currently working on a Mastra workflow and I am having an issue where the workflow progresses fine, but then mid way through, it appears to restart seemingly for no reason. The really strange thing is that step before the restart doesn't error, and actually completes later on. It's like two branches of the worklow are running in parallel.
If I look at traces I can see that there are in fact two traces that get created with the same runId. The first traces where the workflow runs all the way through successfully, and then a second execution trace that starts midway through the first trace execution and fails (the first step checks some state in a CMS and fails because it has already been created by the first execution).
Has anyone else seen this behaviour? I am running the workflow with the workflow.startAsync from the client SDK perhaps that could have something to do with it.
Any help would be appreciated! Thanks
If I look at traces I can see that there are in fact two traces that get created with the same runId. The first traces where the workflow runs all the way through successfully, and then a second execution trace that starts midway through the first trace execution and fails (the first step checks some state in a CMS and fails because it has already been created by the first execution).
Has anyone else seen this behaviour? I am running the workflow with the workflow.startAsync from the client SDK perhaps that could have something to do with it.
Any help would be appreciated! Thanks

