# What happens when an OpenAI Agents SDK guardrail trips?

An agent-level tripwire stops the run and raises `InputGuardrailTripwireTriggered` or `OutputGuardrailTripwireTriggered`. A blocking input guardrail catches the request before the agent starts; the default parallel mode can spend tokens or call a tool before the tripwire lands. A function-tool guardrail has another choice: reject the call or result and let the agent continue, or raise a tool-scoped tripwire exception and stop it. [The SDK documents both paths](https://openai.github.io/openai-agents-python/guardrails/).

The decision survives the exception. An agent tripwire carries `guardrail_result`, and its input or output results include the check that fired. A tool tripwire carries `guardrail` and `output` directly; its `run_data` lists hold earlier completed tool checks, not the triggering result. [The SDK documents the exception fields](https://openai.github.io/openai-agents-python/guardrails/). Counting trips from the agent-level result list alone will miss tool trips.

---

Sources:
- OpenAI Agents SDK docs: Guardrails: https://openai.github.io/openai-agents-python/guardrails/ (fetched 2026-09-25)

Source: https://tessary.ai/answers/openai-agents-sdk-evals/what-happens-when-an-openai-agents-sdk-guardrail-trips
More on Openai agents sdk evals: https://tessary.ai/answers/openai-agents-sdk-evals
From Tessary, agent reliability for AI agents in production: https://tessary.ai
