No public Microsoft record confirms this exact Teams desktop pop-out defect for Microsoft Agents SDK .NET 1.8.77, so the practical mitigation is to disable streaming for affected Teams conversations and send the completed answer as a normal message while the client-rendering issue is escalated.
Recommended mitigation
Make the fallback application-controlled rather than expecting Teams or StreamingResponse to convert an incomplete stream automatically:
- Generate and accumulate the complete response server-side.
- For Teams, bypass
StreamingResponse and send one ordinary message activity.
- Retain streaming for other channels, or expose it behind a feature flag so it can be re-enabled after validating a Teams client or SDK update.
- Do not send both the streamed final activity and a fallback message unconditionally; that can create duplicate answers when streaming succeeds.
Conceptually:
var finalText = await GenerateCompleteAnswerAsync(cancellationToken);
if (turnContext.Activity.ChannelId == "msteams" &&
options.DisableTeamsStreaming)
{
await turnContext.SendActivityAsync(
MessageFactory.Text(finalText),
cancellationToken);
return;
}
// Existing informative-update and streaming implementation.
await StreamAnswerAsync(turnContext, finalText, cancellationToken);
There is no documented channel-side guarantee that a failed streaming presentation automatically falls back to an ordinary message. The documented lifecycle must be completed explicitly: informative update, text chunks, then stream finalization. After finalization, no more updates can be sent.^1^
Validate the stream contract before classifying it as client-only
Successful 2xx responses confirm that Teams accepted the activities, but do not prove that all activities belonged to one correctly formed stream or that the client rendered the final transition.
Capture sanitized outbound activity payloads and verify:
- The first informative update returns a stream ID, and every later chunk and final activity uses that same ID. A Microsoft Teams SDK issue specifically recommends checking the stream ID per emitted chunk when behavior suggests multiple streams.^2^
- Only one stream is open for the conversation. Multiple conversations may stream concurrently, but each conversation can have only one open stream.
- Every update remains associated with the triggering user activity. Streaming is intended for replies handled within that incoming activity’s handler, not proactive messaging.
- The complete operation finishes within ten minutes of the first informative update or content chunk.
- No informative update is sent after the first content chunk; later informative updates are not displayed.
- The final operation actually closes the stream rather than only sending the last text chunk.^3^
If constructing the protocol directly, the final activity must contain the complete text, the original replyToId, the original streamId, and streamType: final; it must omit streamSequence. Each intermediate REST update contains the full accumulated text rather than only the newly generated token.^3^
Isolate and report the client defect
Because the failure depends on which conversation the main Teams window displays, preserve the successful same-conversation test as the control case and collect:
- Exact Teams desktop build from Settings → About Teams.
- Whether the same reproduction succeeds in Teams web.
- A screen recording showing both windows and their active conversations.
- UTC timestamp, tenant region, conversation ID, activity IDs, correlation IDs, stream ID, and sanitized payload sequence.
- The result of a non-streaming build using the same bot, prompt, and final text.
- Whether the failure affects multiple users and devices on the same Teams build.
Submit an issue to the public microsoft/Agents-for-net repository and open a Microsoft support case for Teams/Azure Bot Service. The public .NET issue history contains other Teams streaming limitations and timeouts, but none of the available reports match the pop-out/focus-dependent rendering failure described here. For example, the open timeout report concerns streams being cut off during long-running operations, not separate Teams windows.^4^
Do not treat clearing cache, reinstalling Teams, Adaptive Card invoke-response changes, or the JavaScript SDK’s buffering-delay issue as established fixes for this case; those reports concern different symptoms and execution paths.
References
- StreamingResponse class-Remarks
- [Dev support]: Informative Update Streaming #2506 - GitHub
- Stream Agent Messages - Teams | Microsoft Learn
- #503 Teams stream timeout when streaming a message