---
type: email
from: "chatgpt-codex-connector[bot]" <notifications@github.com>
subject: Re: [openai/openai-agents-python] Fix: Input guardrails now properly

 block tool execution (PR #1914)
received: 2026-03-06 08:06:20
date_header: Thu, 16 Oct 2025 19:44:26 -0700
priority: normal
status: awaiting_approval
uid: 32777
---

## Email Content

**From:** "chatgpt-codex-connector[bot]" <notifications@github.com>
**Subject:** Re: [openai/openai-agents-python] Fix: Input guardrails now properly

 block tool execution (PR #1914)
**Date:** Thu, 16 Oct 2025 19:44:26 -0700

### Body (preview)

@chatgpt-codex-connector[bot] commented on this pull request.





### 💡 Codex Review



Here are some automated review suggestions for this pull request.

    



<details> <summary>ℹ️ About Codex in GitHub</summary>

<br/>



Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

- Open a pull request for review

- Mark a draft as ready

- Comment "@codex review".



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









When you [sign up for Codex through ChatGPT](https://openai.com/codex), Codex can also answer questions or update the PR.

- @codex fix this CI failure

- @codex address that feedback

            

</details>



>                  if current_turn == 1:

-                    # Run the input guardrails in the background and put the results on the queue

-                    streamed_result._input_guardrails_task = asyncio.create_task(

-                        cls._run_input_guardrails_with_queue(

-                            starting_agent,

-                            starting_agent.input_guardrails + (run_config.input_guardrails or []),

-                            ItemHelpers.input_to_new_input_list(prepared_input),

-                            context_wrapper,

-                            streamed_result,

-                            current_span,

-                        )

+                    # Run input guardrails first, before starting the streamed agent turn.

+                    # This prevents tools from executing when guardrails should block the input.

+                    # We await this to ensure guardrails complete before the agent starts.

+                    await cls._run_input_guardrails_with_queue(

+                        starting_agent,

+                        starting_agent.input_guardrails + (run_config.input_guardrails or []),

+                        ItemHelpers.input_to_new_input_list(prepared_input),

+

---

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