Skip to content

OpenAIAgentsIntegration crashes when Runner.run is called with starting_agent kwarg #6418

Closed

Description

@gualican

How do you use Sentry?

Sentry Saas (sentry.io)

Version

2.53.0

Steps to Reproduce

  1. Initialize Sentry with OpenAIAgentsIntegration enabled

  2. Call OpenAI Agents SDK Runner.run with the agent passed as the documented keyword argument:

from agents import Agent, Runner

agent = Agent(name="test", instructions="Be concise.")

await Runner.run(
    starting_agent=agent,
    input="hello",
)

### Expected Result


`OpenAIAgentsIntegration` should support valid `Runner.run` call shapes where the starting agent is passed by keyword:

Runner.run(starting_agent=agent, input=input, ...)

Actual Result

The integration crashes with:

IndexError: tuple index out of range

on this line

# sentry_sdk/integrations/openai_agents/patches/runner.py
agent = args[0].clone()

Activity

  1. linear-code commented on May 26, 2026

    @linear-code
  2. moved this to Waiting for: Product Owner in GitHub Issues with 👀 3on May 26, 2026
  3. self-assigned this
    on May 26, 2026
  4. ericapisani commented on May 26, 2026

    @ericapisani
    Member

    Hi @guadalupe-duolingo ,

    Thanks for opening an issue with us, we'll take a look when we have a moment.

  5. moved this from Waiting for: Product Owner to No status in GitHub Issues with 👀 3on May 26, 2026
  6. added a commit that references this issue on May 27, 2026
    7bf1d6e
  7. added a commit that references this issue on Aug 9, 2026
    4d1cdc5
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions