Repository navigation
.NET: [BREAKING] Postpone task support in A2A hosting - #10037
SergeyMenshykh merged 2 commits into
Conversation
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
🟢 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
AgentRunModeoption and makes default registrations useReturnMessage. - Expands tests to verify aggregated messages across registration methods, streaming modes, and
ReturnImmediatelysettings. - 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
There was a problem hiding this comment.
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>
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.