You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Not found tool execution brakes down the session. #2204
For the OpenAI Realtime model, when the model hallucinates a tool that is not hooked into the tool list, and platforms SDK fails and raises an exception, causing teardown of the session.
Tool hallucination is very likely to happen in complex prompts, as well as OpenAI's text mode.
Made-up tool errors are also opened with other bugs but closed due to inactivity; #1671
Debug information
Agents SDK version: v0.6.3
Python version: Python 3.11
Repro steps
Add a system instruction for a made-up or non-existent tool. (also a tool name similar but not an exact one of the one added to the system)
During the execution, when the tool fails exception is raised, the following log is raised, and the whole session is down.
``agents.exceptions.ModelBehaviorError: Tool xxxx not found.
Expected behavior
As the tool fails, this error can be logged and propagated as a message or handler, allowing the session to continue with the error handled by the application.
Reacted by Maximilian Gangloff, sand, Gokalp Peker, Riddhima Narravula and Grantward1
I have a particular agent which is constantly making up tools. I have explicitly set it to not use tools: 'model_settings' = agents.ModelSettings(tool_choice='none')
An error occurred while running the tool. Please try again. Error: Tool repo_browser.create_file not found in agent Command Display Agent
Activity
sandsc commentedon Dec 19, 2025
Having same issue too
aligokalppeker commentedon Dec 24, 2025
Any updates about this bug @seratch , any plan to fix or improve this?
Convert tool execution exception to runtime error, fixes openai#2204
fix: openai#2204 Convert tool execution exception to runtime error (o…
Grantward1 commentedon Feb 4, 2026
I have a particular agent which is constantly making up tools. I have explicitly set it to not use tools:
'model_settings' = agents.ModelSettings(tool_choice='none')