Agent using Tool HITL is asking for approval after I call declineToolCall
I have an agent with various tools, and one of them has requiresApproval: true.
For some reason, even if I decline the tool, the agent still asks for approval.
When I take this same tool (still with requiresApproval true) and I put it on another thin agent with no other tools and shorter instructions, then the agent does respect the tool rejection.
Here is a snippet of the traces where you can see what was inputted to the LLM by the time it decided to ask for approval rather than simply stopping the tool execution:
This was in the input to step: 1.
And you can also see a screenshot of the traces where the agent simply streams tool-call-approval regardless.
We are using "@mastra/core": "^0.24.8",
For some reason, even if I decline the tool, the agent still asks for approval.
When I take this same tool (still with requiresApproval true) and I put it on another thin agent with no other tools and shorter instructions, then the agent does respect the tool rejection.
Here is a snippet of the traces where you can see what was inputted to the LLM by the time it decided to ask for approval rather than simply stopping the tool execution:
This was in the input to step: 1.
And you can also see a screenshot of the traces where the agent simply streams tool-call-approval regardless.
We are using "@mastra/core": "^0.24.8",
