-
Notifications
You must be signed in to change notification settings - Fork 569
fix(openai-agents): Avoid double span exit on exception #5174
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
alexander-alderman-webb
merged 31 commits into
master
from
webb/openai-agents-span-management
Dec 3, 2025
Merged
Changes from 12 commits
Commits
Show all changes
31 commits
Select commit
Hold shift + click to select a range
9f2c047
fix(openai-agents): Store invoke_agent span on agents.RunContextWrapper
alexander-alderman-webb 4ca61e6
be defensive when accessing the agent span
alexander-alderman-webb 2c0edd5
fix(openai-agents): Avoid double span exit on exception
alexander-alderman-webb cea080b
Merge branch 'master' into webb/store-span-on-openai-agents-context-w…
alexander-alderman-webb f9521de
Merge branch 'webb/store-span-on-openai-agents-context-wrapper' into …
alexander-alderman-webb 5a70ca0
restore end existing span
alexander-alderman-webb baa1b59
mypy
alexander-alderman-webb e6e40b1
access correct attribute
alexander-alderman-webb cb23da0
deduplicate
alexander-alderman-webb bc982ed
delattr on exit
alexander-alderman-webb a8fb881
Merge branch 'webb/store-span-on-openai-agents-context-wrapper' into …
alexander-alderman-webb 557fc90
delattr on exit
alexander-alderman-webb dd3063b
call _end_invoke_agent_span instead of manually closing span
alexander-alderman-webb e5d5c52
add except block
alexander-alderman-webb e738f3d
move end_invoke_agent_span
alexander-alderman-webb 64c2cfa
forgot __init__.py
alexander-alderman-webb cea38a2
mypy
alexander-alderman-webb 90f5dba
capture_exception first
alexander-alderman-webb 59732ed
do not capture exception twice
alexander-alderman-webb e9e9e3a
capture all exceptions again
alexander-alderman-webb 4580edc
type annotation
alexander-alderman-webb 0477a4b
mypy
alexander-alderman-webb ef3ddc6
remove unreachable assertion
alexander-alderman-webb 470bbbb
merge master
alexander-alderman-webb ea91e54
merge master
alexander-alderman-webb b3e5d01
simplify exception cases
alexander-alderman-webb 5d9e0d0
more capture_exception to outer layer
alexander-alderman-webb c7a8a44
remove _SingleTurnException
alexander-alderman-webb 65a230f
deduplicate end agent invocation functions
alexander-alderman-webb ba09279
remove unused imports
alexander-alderman-webb 1acb4d0
.
alexander-alderman-webb File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.