Repository navigation
Description
Observed Behavior
A Foundry-hosted agent that routes each request to one of two inner agents fails when the stored conversation holds a tool approval that only one of them can pair.
Setup:
- A
DelegatingAIAgentwraps a normalChatClientAgent(with toolbox tools) and, for some requests, runs a workflow instead. - The workflow path ends its answer with a synthetic
ToolApprovalRequestContent(a single approval for a proposed list of actions; it does not come from a model function call). The next user turn carries the matchingToolApprovalResponseContent, and the router handles it. - The host stores the conversation and replays it to whichever agent answers the next request (a
VolatileChatHistoryProvideris present in the run options).
Sequence that fails (local Agent Inspector, same conversation):
- A request that runs the workflow, ending in the synthetic approval request.
- The approval response, handled by the router.
- A plain follow-up question that goes to the conversational
ChatClientAgent.
Step 3 fails with an error stating that a ToolApprovalRequestContent has no matching ToolApprovalResponseContent. The replayed history contains the synthetic approval, and the conversational agent's function-invocation layer cannot pair it.
What is not established
I do not have a minimal reproduction yet, and I have not established why the pair does not match on replay (the response is present in the stored conversation from step 2, but the replayed history does not satisfy the pairing check). It may depend on how the response is stored, on content identity, or on the synthetic request having no originating FunctionCallContent. I am filing this to ask whether the design intent is covered, not to claim a specific defect.
Questions
- Is replaying history that contains approval content not produced by the receiving agent supported? If so, what must be preserved for the pair to match?
- Should the pairing check tolerate approval requests that were already answered earlier in the conversation, instead of failing the turn?
- Is there a supported way for a wrapper agent to mark approval content as owned by another agent, short of rewriting history?
Workaround in use
A history filter on the conversational path removes the synthetic approval request and its response from the messages before they reach the inner agent. It works but depends on knowing which approvals belong to which path.
Related
#7872 (closure semantics for dangling tool calls and approvals) and #5189 (reconciliation failure after session serialization, closed) touch the same pairing logic.
Package Versions
Microsoft.Agents.AI.Foundry.Hosting 1.28.0-preview.261106.1, Microsoft.Agents.AI.Abstractions 1.28.0
.NET Version
.NET 10
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsNo status
Activity
github-actions commentedon Nov 17, 2026
Automated triage: inconclusive. I did not run a reproduction, because the report has no minimal repro and needs a Foundry-hosted setup. I'm not claiming it reproduces.
Source evidence: the "no matching
ToolApprovalResponseContent" check appears to come from the function-invocation layer. That layer is most likelyMicrosoft.Extensions.AI, which is outside this repository. This repo's code doesn't contain that message. An approval request with no originatingFunctionCallContent, replayed to a different agent, would be an unusual input for that layer.Support boundary: unclear. I found no maintained spec or decision record on replaying approval content across inner agents. A maintainer needs to decide whether this is supported scope, so questions 1 and 3 are left to them. The issue is routed to the .NET fallback owner because the owning package is unclear.
A minimal repro would help: two
ChatClientAgents sharing one history, with a syntheticToolApprovalRequestContentfollowed by its response, then a plain user turn. Please also say whether the response'sIdmatches the request's.Run: https://github.com/microsoft/agent-framework/actions/runs/44196398489