network() stream doesn't forward reasoning events from sub-agents

Environment:
@mastra/core: beta
@mastra/ai-sdk: beta
Model: anthropic/claude-haiku-4-5

What I Expected: When using agent.network() with extended thinking enabled on sub-agents, I expected reasoning-delta events to be forwarded in the stream (similar to how agent.stream() works with sendReasoning: true).

What Actually Happens: The network stream emits agent-execution-event-text-delta but NOT agent-execution-event-reasoning-* events. Reasoning tokens are consumed internally, but the actual reasoning content is not accessible.

Minimal Reproduction:

// chat-agent.ts - Parent agent with sub-agent
export const chatAgent = new Agent({
  id: 'chat-agent',
  instructions: {
    role: 'system',
    content: 'You are a router...',
    providerOptions: {
      anthropic: {
        thinking: { type: 'enabled', budgetTokens: 4000 }
      }
    }
  },
  model: 'anthropic/claude-haiku-4-5',
  agents: { strategist: strategistAgent }
});
// Test script
const stream = await chatAgent.network('Hello', { memory: { thread: 'test' } });
for await (const chunk of stream) {
  console.log(chunk.type);
  // Never see: agent-execution-event-reasoning-delta
  // Do see: agent-execution-event-text-delta
}


Verification:

agent.stream() with toAISdkStream({ sendReasoning: true }) → reasoning events visible ✅
agent.network() → no reasoning events in stream ❌
MastraAgentNetworkStream.usage has reasoningTokens property, suggesting it should be tracked

Question: Is this intentional? If so, is there a recommended way to access sub-agent reasoning in network streams?
Was this page helpful?