Symptom
A deferred hosted MCP server can be discovered through tool_search, then executing a discovered tool on the next MemorySession turn throws ModelBehaviorError: Model produced deferred MCP call OpenAI_Docs before it was loaded via tool_search.
Evidence what you'll see
- The discovery result represents the tools as a namespace named
mcp_OpenAI_Docs. The runner records qualified function names, but its hosted MCP execution check requires the bare server labelOpenAI_Docsto be in the loaded set. - This follows issue #1978:
0.19.0exemptsmcp_list_toolsfrom the check, so discovery succeeds, but a later completedmcp_callis still rejected for this response shape. - Ordinary tool names reproduce it. Published packages
@openai/agents,@openai/agents-core, and@openai/agents-openaiat0.19.0. Node.jsv25.8.1, Linux.
Why it happens
The loaded-set check did not treat a namespace-shaped discovery (mcp_<server label>) as loading that server. Pull request 2045 matches the exact called tool within that namespace and uses the same rule when retaining discovery provenance for blocked output.
Affected versions
Published Agents JS SDK 0.19.0. Node.js v25.8.1, Linux. Live observation used hosted MCP with deferLoading: true, requireApproval: 'never', MemorySession, store: false.
Fix steps
0 of 2 done
Your check marks stay in this browser only.
How to check it worked
- After
tool_searchreturns a namespace-shaped list, the next turn's hosted MCP call runs and does not throwbefore it was loaded via tool_search.
If it still fails
- Dotted-name API input validation is a separate issue. The linked issue does not describe this
ModelBehaviorErroron0.20.0.
Sources and credit
Summarized in our own words from these public reports. Credit goes to their authors.
Provided as is, without warranty. Try changes in a non-production environment and back up first. Security-related steps: verify against the official docs. Terms · Request removal or attribution change
Hit an error we don't cover? Submit it