Description
Human-in-the-loop functionality using AIApprovalFunction is not working when an agent is configured as a tool and invoked by a triage agent.
Scenario:
Created Agent B with AIApprovalFunction (human approval required).
Agent B works correctly when invoked directly.
Agent B is then registered as a tool in Agent A (triage agent).
When Agent A invokes Agent B as a tool, the approval flow is not triggered.
Expected Behavior:
When Agent B is called (even as a tool), the AIApprovalFunction should trigger the human-in-the-loop approval process.
Actual Behavior:
Agent B executes without triggering approval.
No human intervention step is invoked.
Steps to Reproduce:
Create an agent (Agent B) with AIApprovalFunction.
Verify approval flow works when calling Agent B directly.
Register Agent B as a tool in another agent (Agent A - triage agent).
Invoke Agent B via Agent A.
Observe that approval is skipped.
Code Sample
Error Messages / Stack Traces
Package Versions
Microsoft.Agents.AI 1.6.2
.NET Version
No response
Additional Context
No response
Description
Human-in-the-loop functionality using AIApprovalFunction is not working when an agent is configured as a tool and invoked by a triage agent.
Scenario:
Created Agent B with AIApprovalFunction (human approval required).
Agent B works correctly when invoked directly.
Agent B is then registered as a tool in Agent A (triage agent).
When Agent A invokes Agent B as a tool, the approval flow is not triggered.
Expected Behavior:
When Agent B is called (even as a tool), the AIApprovalFunction should trigger the human-in-the-loop approval process.
Actual Behavior:
Agent B executes without triggering approval.
No human intervention step is invoked.
Steps to Reproduce:
Create an agent (Agent B) with AIApprovalFunction.
Verify approval flow works when calling Agent B directly.
Register Agent B as a tool in another agent (Agent A - triage agent).
Invoke Agent B via Agent A.
Observe that approval is skipped.
Code Sample
Error Messages / Stack Traces
Package Versions
Microsoft.Agents.AI 1.6.2
.NET Version
No response
Additional Context
No response