From 74d0434a91bdb9162c31feaaeabeb9797cea3b0d Mon Sep 17 00:00:00 2001 From: Jacob Alber Date: Thu, 28 May 2026 16:32:28 -0400 Subject: [PATCH] Fix intermediate filtering on .AsAgent() --- dotnet/src/Microsoft.Agents.AI.Workflows/WorkflowSession.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dotnet/src/Microsoft.Agents.AI.Workflows/WorkflowSession.cs b/dotnet/src/Microsoft.Agents.AI.Workflows/WorkflowSession.cs index 2caba8f3ec..c597c83a78 100644 --- a/dotnet/src/Microsoft.Agents.AI.Workflows/WorkflowSession.cs +++ b/dotnet/src/Microsoft.Agents.AI.Workflows/WorkflowSession.cs @@ -524,8 +524,8 @@ internal sealed class WorkflowSession : AgentSession // AgentResponseUpdateEvent's behavior: always forward, regardless of the // _includeWorkflowOutputsInResponse host flag. Under the legacy default, // keep today's behavior — gated by the include flag. - if (!Futures.EnableAgentResponseOutputTaggingAndFiltering && - !this._includeWorkflowOutputsInResponse) + if ((Futures.EnableAgentResponseOutputTaggingAndFiltering && !output.IsIntermediate() || + (!Futures.EnableAgentResponseOutputTaggingAndFiltering && !this._includeWorkflowOutputsInResponse))) { goto default; }