-
Notifications
You must be signed in to change notification settings - Fork 220
Open
Labels
bugSomething isn't workingSomething isn't workingneeds-more-infopackage:agents-corequestionFurther information is requestedFurther information is requestedskip-stale
Description
Please read this first
- Have you read the docs? Agents SDK docs ✅
- Have you searched for related issues? Others may have faced similar issues. ✅
Describe the bug
When I have an Agent as a tool that has a tool itself that has needsApproval
to be true
, the run result.interruptions
array remains empty.
Debug information
- Agents SDK version: v0.0.11
- Runtime environment Node.js 22.15.1
Repro steps
Agent A has Agent B asTool
in tools
array
const agentA = new Agent({
...
tools: [
agentB.asTool({
...
})
]
})
Agent B has Tool A in tools
array
const agentB = new Agent({
...
tools: [
toolA
]
})
Tool A has needsApproval
to return true
const toolA = tool({
...
needsApproval: async (_ctx, _input) => {
console.log('> approval check', _ctx, _input);
return true;
}
})
Run result does not return any interruptions
const result = await runner.run(agentA, conversation, promptOpts);
if(result.interruptions?.length){
console.log('> pause for approval', JSON.stringify(result.state, null, 2));
}
Expected behavior
Expected behavior is that result.interruptions
will have items, however it does not. The conversation just returns a finalOutput
that implies that something is happening in the background.
What I have noticed is that if I have Agent B has a handoff within Agent A, then it works and I receive result.interruptions
items, however its conversational behavior as a handoff is not what I'm trying to achieve.
Is this intended SDK behavior?
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingneeds-more-infopackage:agents-corequestionFurther information is requestedFurther information is requestedskip-stale