M
MastraAI2w ago
Zef

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
No description
No description
3 Replies
Zef
ZefOP2w ago
To add to this it definitely seems related to startAsync, if I run the workflow with stream I don't get the issue.
_roamin_
_roamin_2w ago
Hi @Zef ! That's weird, it looks like the first run fails. Could you try setting up the new AI tracing, you might be able to see a better error message: https://mastra.ai/en/docs/observability/ai-tracing/overview#configuration
Mastra Triager
GitHub
[DISCORD:1425227220250529864] Workflow execution strangeness · Iss...
This issue was created from Discord post: https://discord.com/channels/1309558646228779139/1425227220250529864 Hi I am currently working on a Mastra workflow and I am having an issue where the work...

Did you find this page helpful?