microsoft / microsoft/agent-framework

.NET: [Bug]: Human-in-the-loop (AIApprovalFunction) not triggering when agent is used as a tool in triage agent

Open
#6,062 5 comments 0 reactions 1 assignee Claimed by @rogerbarreto View on GitHub
.NET agents reproduced
Dominant language
Python
Stars
13.6k
Forks
2.3k
Avg merge
2d 45m
Merged PRs (30d)
358

Description

### 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

```markdown

```

### Error Messages / Stack Traces

```markdown

```

### Package Versions

Microsoft.Agents.AI 1.6.2

### .NET Version

_No response_

### Additional Context

_No response_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.