I’m running into a consistent issue with Mastra (latest stable version
0.24.1
0.24.1
) where a tool’s output isn’t being passed back to the agent during execution.
What’s Happening:
- The agent successfully calls the tool. - The tool executes normally and produces the correct output. - But the agent never receives the tool result—the process simply ends quietly with no error. - No follow-up actions, no continuation, no reasoning loop—just a silent stop after the tool finishes.
What I’ve Checked
- Tool schema & return types are correct - Agent is properly configured with the tool - Clear instructions for returning text output - Logging shows the tool’s return payload is generated - Happens across multiple tools - Using latest Mastra version - Setup: Conversation (RAG) Agent + OpenRouter + AI SDK 5 + useChat hook + fastify server
What I Expected
The agent should consume the tool result and continue its thought/action chain, but the callback never triggers.
---
Code Example screenshot attached
Attached langufse screenshot PS: it was happening on previous version of Mastra as well, but I updated it to see if anything changes.