---
type: email
from: Zach Birenbaum <notifications@github.com>
subject: Re: [openai/openai-agents-python] Fix streaming trace end before

 guardrails complete (PR #1921)
received: 2026-03-06 08:07:21
date_header: Fri, 17 Oct 2025 14:55:17 -0700
priority: normal
status: awaiting_approval
uid: 32856
---

## Email Content

**From:** Zach Birenbaum <notifications@github.com>
**Subject:** Re: [openai/openai-agents-python] Fix streaming trace end before

 guardrails complete (PR #1921)
**Date:** Fri, 17 Oct 2025 14:55:17 -0700

### Body (preview)

@zbirenbaum commented on this pull request.







> @@ -1138,6 +1138,12 @@ async def _start_streaming(

 

             streamed_result.is_complete = True

         finally:

+            if streamed_result._input_guardrails_task:



I think a better place to put this might be where the output guardrails are awaited (await both the input and output rails with gather or something if they haven't finished by when output ones are running) but this preserves the existing functionality. Would like input if someone with more context has any.



-- 

Reply to this email directly or view it on GitHub:

https://github.com/openai/openai-agents-python/pull/1921#pullrequestreview-3352253924

You are receiving this because you are subscribed to this thread.



Message ID: <openai/openai-agents-python/pull/1921/review/3352253924@github.com>

---

## Suggested Actions
- [ ] Reply
- [ ] Archive
- [ ] Escalate
