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
OpenAI Agents integration crashes on startup with openai-agents >= 0.7.0 (AttributeError: AgentRunner._get_all_tools) #5433
Install sentry-sdk[fastapi]==2.51.0 and openai-agents==0.8.0
Initialize Sentry with default auto-enabled integrations:
import sentry_sdk
sentry_sdk.init(
dsn="...",
send_default_pii=True,
traces_sample_rate=1.0,
)
3. The app crashes immediately on startup before serving any
requests.
Expected Result
Sentry initializes successfully. The openai_agents integration either works with openai-agents>=0.7.0 or gracefully skips itself if the installed version is incompatible.
Actual Result
File "/usr/local/lib/python3.11/site-packages/sentry_sdk/client.py",
line 423, in _init_impl
self.integrations = setup_integrations(
^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/sentry_sdk/integrations
/__init__.py", line 258, in setup_integrations
type(integration).setup_once()
File "/usr/local/lib/python3.11/site-packages/sentry_sdk/integrations
/openai_agents/__init__.py", line 60, in setup_once
_patch_tools()
File "/usr/local/lib/python3.11/site-packages/sentry_sdk/integrations
/openai_agents/__init__.py", line 50, in _patch_tools
_create_get_all_tools_wrapper(agents.run.AgentRunner._get_all_tools),
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: type object 'AgentRunner' has no attribute
'_get_all_tools'
The openai_agents integration auto-enables when openai-agents is
installed and tries to monkey-patch AgentRunner._get_all_tools, which
was removed in openai-agents ~0.7.0 (see openai/openai-agents-python#1267). Since the
integration doesn't check the library version, it crashes the entire
application on startup with no way to recover, the exception is
unhandled during sentry_sdk.init().
This is particularly severe because it's a hard crash (not a warning)
and prevents the application from starting at all.
Activity
linear commentedon Feb 8, 2026
PY-2075
sentrivana commentedon Feb 16, 2026
Hey, thanks for reporting, we're tracking this in #5429.
openai_agentsintegration crashes with openai-agents==0.8.0 (AgentRunner has no _get_all_tools) #5429