Observational Memory + Sub-Agents: "Exhausted all fallback models" on primary agent's final response
AgentMemory
SETUP I have a primary research agent with Observational Memory (OM) that uses sub-agents via the agents config (which wraps them as tools). Both the primary agent and its sub-agents have their own OM configured. I'm routing via Portkey.
The Problem When the sub-agent finishes its work and the primary agent is about to produce its final response, the Mastra Studio UI shows:
{message:Exhausted all fallback models and reached the maximum number of retries.,name:Error}
{message:Exhausted all fallback models and reached the maximum number of retries.,name:Error}
What works - OM works correctly on both agents individually — traces confirm observations and reflections fire as expected. - If I flatten the primary agent (move all tools directly onto it, remove agents config entirely), everything works and the final response is produced. - Portkey model configs are valid — requests are sent and responses received throughout the conversation. The error only occurs at the final response step when OM + sub-agents are combined.