Abort a single subagent run or tool call
Cancel one in-flight unit of work inside an active task β either a
subagent run or a tool call β without stopping the parent task or its
siblings. Provide exactly one of subagent_run_id or tool_call_id:
subagent_run_id: aborts that subagent run. The parent agentβs LLM sees a structured tool result for thetrigger_*_agentcall indicating the subagent was aborted, and reasons over it. The id is surfaced in the stream viadata-subagent-streamchunks (subagent_run_idfield).tool_call_id: aborts that tool execution. The enclosing agent sees a structuredπ ABORTEDtool result and reasons over it like any other tool error. The id is the Mastra-generated id surfaced intool-input-available/tool-callstream chunks.
Exactly one of the two ids must be present (not both, not neither).
Idempotent: unknown ids return 200 with success: true and
found: false.
Authorizations
JWT authentication token
Path Parameters
Task ID
Body
Provide exactly one of subagent_run_id or tool_call_id. Both
present or both absent is rejected with 400. Which field is set
selects what gets aborted (a subagent run vs. a tool call).
Subagent run id surfaced in the stream's data-subagent-stream
chunks. Unique per concurrent subagent invocation within a task.
Set this to abort a subagent run.
Mastra-generated tool call id surfaced in tool-input-available
and tool-call stream chunks. Set this to abort a tool call.
Response
Target aborted successfully (or already gone)
True iff the target id was actually present and aborted. False means the id was wrong or the target had already finished. Idempotent: success stays true regardless.
Echoed back when a subagent run was the target.
Which kind of target the request acted on.
subagent, tool Echoed back when a tool call was the target.

