HELP: sub agent calls supervisor agent tools

i have a multi agent setup using subagents wrapped as tools. The reason why i have pivoted to such a setup is mainly because of
agent.network()
fails to wait for user confirmation at routing agent level for a suspended workflow initiated by the subagent.

So i am following the supervisory agent method, Everything works well with this setup as you can see in the brief video the traces are perfect as expected
supervisor
->
outcome agent
->
workflow
including feedback, however sometimes (could not identify when but seems like mostly at HITL steps) sub agent calls the wrapped tool to call itself, and hence fails by
Error: Tool delegateToOutcomeAgent not found


This is my supervisor agent
const chatAgent = new Agent({
  name: "Chat Agent",
  memory: async ({
    runtimeContext,
  }: {
    runtimeContext: RuntimeContext<Context>;
  }) => {
    return await getMemory(runtimeContext.get("schemaId"));
  },
  model: getClaudeModel("claude-3-7-sonnet-latest"),
  tools: {
    delegateToOutcomeAgent,
  },
  instructions: chatAgentInstruction,
});
export { chatAgent };


sub agent:
export const outcomeAgent = new Agent({
  name: "Outcome Agent",
  description: `This agent helps users create clear, measurable business outcomes through guided conversation.
    It gathers context, evaluates information quality, and generates concise, actionable outcomes
    with specific timelines and expected results. Use this agent when users want to define goals,
    objectives, or measurable business targets.`,
  memory: async ({
    runtimeContext,
  }: {
    runtimeContext: RuntimeContext<Context>;
  }) => {
    return await getMemory(runtimeContext.get("schemaId"));
  },
  model: getClaudeModel("claude-3-7-sonnet-latest"),
  instructions: outcomeAgentInstruction,
  tools: {
    startOutcomeWorkflow: startOutcomeWorkflowTool,
    resumeOutcomeWorkflow: resumeOutcomeWorkflowTool,
  },
});
Was this page helpful?
HELP: sub agent calls supervisor agent tools - Mastra