Skip to content

fix(openai): trace agent session result collection - #873

Merged
Abhijeet Prasad (AbhiPrasad) merged 2 commits into
mainfrom
abhi/fix-agent-stream-tracing-b025e07d
Oct 5, 2026
Merged

Abhijeet Prasad (AbhiPrasad) merged 2 commits into
mainfrom
abhi/fix-agent-stream-tracing-b025e07d

Conversation

@AbhiPrasad

@AbhiPrasad Abhijeet Prasad (AbhiPrasad) commented Oct 5, 2026 •

Copy link
Copy Markdown
Member
  • Trace agent session events when get_final_result() drains sync or async streams.
  • Keep with_result_collection() chained calls on the traced wrapper.

Fixes #859

Drain AgentSessionEventStream through the traced iterator for
get_final_result(), and keep with_result_collection() on the
traced wrapper. Add sync and async regression coverage.

Fixes #859
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 5, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-05T15:46:57.626279Z e156621 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: e1566218d8

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "Codex (@codex) review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "Codex (@codex) address that feedback".

Comment thread py/src/braintrust/integrations/openai/tracing.py
@AbhiPrasad
Abhijeet Prasad (AbhiPrasad) merged commit 007df27 into main Oct 5, 2026
83 checks passed
@AbhiPrasad
Abhijeet Prasad (AbhiPrasad) deleted the abhi/fix-agent-stream-tracing-b025e07d branch October 5, 2026 16:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

OpenAI: Agents session stream get_final_result() / with_result_collection() skip tracing

2 participants