MastraM
Mastraโ€ข2mo ago
Aman Zishan

ThreadId undefined in network mode

I am trying to implement a multi agent setup by using workflow as tool to an agent. I have the following setup:

chat agent: serves as the entrypoint to the multi agent system

sub-agent: specialised agent equipped with startWorkflow and resumeWorkflow tool.

Sub agent works perfectly fine with suspend/resuming a workflow using the above tools.


When this sub agent is added to the chat agent and used .network() the chat agent loses track of when to resume.

In order to fix this i am using working memory to keep track of the workflow by run ID, the problem however is that i get thread ID and resource ID as
undefined
when used within the sub-agent tool context

Hence i am not able to retrieve working memory
Screenshot_2025-11-10_at_8.13.25_PM.png
Was this page helpful?