MastraM
Mastra•2mo ago•
15 replies
dns

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:
      {
        "type": "function_call_output",
        "output": "Tool call was not approved by the user",
        "call_id": "call_tzRWtGRjuFkPWulzWKs1JaBJ"
      }

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",
Screenshot_2025-12-22_at_6.52.47_PM.png
Was this page helpful?