Skip to content

.NET: [BREAKING] Postpone task support in A2A hosting - #10037

Merged
SergeyMenshykh merged 2 commits into
microsoft:mainfrom
SergeyMenshykh:sergeymenshykh-a2a-message-only-hosting
Nov 3, 2026
Merged

SergeyMenshykh merged 2 commits into
microsoft:mainfrom
SergeyMenshykh:sergeymenshykh-a2a-message-only-hosting

Conversation

@SergeyMenshykh

Copy link
Copy Markdown
Collaborator

We’re postponing task support in A2A hosting until we can reliably support task resumption, including deployments with multiple hosts. Returning a task is only part of the experience: clients also need to be able to continue it later, even when the follow-up request reaches a different host. That behavior isn’t currently supported, so we’re leaving tasks out of the release rather than offering an incomplete experience.

As we prepare for release, we’re narrowing the built-in hosting support to message-based responses. The hosted agent completes its run and returns a message, without creating a task for the client to manage.

This keeps the release focused on behavior we can support reliably today. We can revisit task support when there’s a reliable way to resume tasks across hosts.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot AI balanced review requested due to automatic review settings November 3, 2026 13:02
@agent-framework-automation agent-framework-automation Bot added .NET Usage: [Issues, PRs], Target: .Net breaking change Usage: [PRs], Target: all PRs that introduce changes that are not backward compatible labels Nov 3, 2026
@SergeyMenshykh SergeyMenshykh self-assigned this Nov 3, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

No active review issues are reported for the change narrowing built-in .NET A2A hosting to message-based responses.

No open issues 🎉

What changed in this PR

This PR narrows built-in .NET A2A hosting to message-based responses, postponing task support until reliable resumption across hosts is available.

Changes:

  • Removes the registration-level AgentRunMode option and makes default registrations use ReturnMessage.
  • Expands tests to verify aggregated messages across registration methods, streaming modes, and ReturnImmediately settings.
  • Updates handler documentation and configuration tests to reflect the reduced hosting scope.
File Description
dotnet/​tests/​Microsoft.Agents.AI.Hosting.A2A.UnitTests/​A2AServerServiceCollectionExtensionsTests.cs Tests aggregated message responses across eight configuration combinations.
dotnet/​tests/​Microsoft.Agents.AI.Hosting.A2A.UnitTests/​A2AEndpointRouteBuilderExtensionsTests.cs Updates the custom-options test to configure streaming instead of task mode.
dotnet/​src/​Microsoft.Agents.AI.Hosting.A2A/​A2AServerServiceCollectionExtensions.cs Constructs the default handler with ReturnMessage.
dotnet/​src/​Microsoft.Agents.AI.Hosting.A2A/​A2AServerRegistrationOptions.cs Removes the public AgentRunMode registration property.
dotnet/​src/​Microsoft.Agents.AI.Hosting.A2A/​A2AAgentHandler.cs Clarifies constructor-controlled run modes and default registration behavior in documentation.

Review effort: Balanced

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

MAF Automated Review — Iteration 1

Result: Findings reported
Scope: full PR (1 commit(s)): 481223ac53c1
Model: gpt-5.6-sol

Overview

The PR removes registration-level task-mode configuration, hard-codes the built-in server path to aggregate new runs into messages, and covers both registration forms, endpoint modes, and ReturnImmediately values with a focused test matrix. Existing cancellation propagation, session persistence, isolation wrapping, and the custom-handler extension point remain intact. The residual risks are process-wide memory exhaustion from unbounded streaming aggregation and continued acceptance of persisted task continuations by the supposedly message-only built-in path.

Reviewed the supplied pull-request change set across correctness, security/reliability, architecture, and failure behavior.
2 verified findings remained after source verification (1 high, 1 medium) across 1 file. Details are attached to the affected lines below.

Affected areas: dotnet/src/Microsoft.Agents.AI.Hosting.A2A/A2AServerServiceCollectionExtensions.cs

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@SergeyMenshykh
SergeyMenshykh added this pull request to the merge queue Nov 3, 2026
Merged via the queue into microsoft:main with commit 4668b67 Nov 3, 2026
33 checks passed
@SergeyMenshykh
SergeyMenshykh deleted the sergeymenshykh-a2a-message-only-hosting branch November 3, 2026 16:26
@github-project-automation github-project-automation Bot moved this from In Review to Done in Agent Framework Nov 3, 2026
This was referenced Nov 9, 2026

This branch was previously deployed

1 inactive deployment
github-app-auth — 98a0f33e Deployed Nov 3, 2026 by SergeyMenshykh via add_label #26963
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

breaking change Usage: [PRs], Target: all PRs that introduce changes that are not backward compatible .NET Usage: [Issues, PRs], Target: .Net

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

4 participants