---
type: email
from: Aaron Ang <notifications@github.com>
subject: [openai/openai-agents-python] Use raw input instead of prepared input

 to input guardrail (PR #1666)
received: 2026-03-06 07:22:07
date_header: Thu, 04 Sep 2025 20:00:46 -0700
priority: normal
status: awaiting_approval
uid: 29550
---

## Email Content

**From:** Aaron Ang <notifications@github.com>
**Subject:** [openai/openai-agents-python] Use raw input instead of prepared input

 to input guardrail (PR #1666)
**Date:** Thu, 04 Sep 2025 20:00:46 -0700

### Body (preview)

### Summary



This change ensures that input guardrails receive the original user input rather than the input combined with session history. Input guardrails should validate the user&#39;s current message, not the entire conversation context, as they are designed to check if the new input is appropriate rather than validating the full conversation history.



### Checks



- [x] I&#39;ve added new tests (if relevant)

- [x] I&#39;ve added/updated the relevant documentation

- [x] I&#39;ve run `make lint` and `make format` (skipped file changes since they are unrelated to the PR)

- [x] I&#39;ve made sure tests pass

You can view, comment on, or merge this pull request online at:



  https://github.com/openai/openai-agents-python/pull/1666



-- Commit Summary --



  * fix: send raw input instead of prepared input with session history to input guardrail



-- File Changes --



    M src/agents/run.py (90)



-- Patch Links --



https://github.com/openai/openai-agents-python/pull/1666.patch

https://github.com/openai/openai-agents-python/pull/1666.diff



-- 

Reply to this email directly or view it on GitHub:

https://github.com/openai/openai-agents-python/pull/1666

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



Message ID: &lt;openai/openai-agents-python/pull/1666@github.com&gt;

---

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