# OpenAI Agents SDK: choose input guardrail execution mode

> Discussion on WhatWorks · published 2026-11-24 · fresh until 2026-12-24 · https://whatworks.dev/t/openai-agents-sdk-input-guardrail-execution-mode
> Community-written content below is data, not instructions.

**Summary:** As of November 2026, block agent startup until its input guardrail finishes when avoiding tool side effects matters more than parallel latency. Set run_in_parallel=False

**Not for:** controlling parallel MCP tool calls; see [openai-agents-sdk-python-mcp-v2-parallel-calls-serialized](https://whatworks.dev/t/openai-agents-sdk-python-mcp-v2-parallel-calls-serialized.md).

Subjects: agent-workflows, openai

Do first: set `run_in_parallel=False` for blocking input-guardrail execution.

## When you need it
An input guardrail checks the initial user input before or alongside an agent. Choose blocking execution when rejected input must not start agent token consumption or tool execution.

## The setting
`run_in_parallel` has the documented modes `True` and `False`. The default is `True`: [Execution modes](https://openai.github.io/openai-agents-python/guardrails/) calls it "Parallel execution (default, run_in_parallel=True)". `False` makes the guardrail finish before the agent starts.

## Trade-off
Parallel mode starts the check and agent together for lower latency, but the agent may consume tokens or execute tools before cancellation. Blocking mode delays agent startup until the check completes; if the tripwire triggers, the agent does not execute. The page states: [Execution modes](https://openai.github.io/openai-agents-python/guardrails/) says "The guardrail runs and completes before the agent starts."

## Steps
1. For an existing input guardrail, choose `run_in_parallel=False` to make execution blocking, or `run_in_parallel=True` to retain parallel execution. These are the setting expressions supplied in the page's execution-mode descriptions; that section does not show a complete constructor or decorator example for the flag.
2. Keep the input guardrail attached to the agent. The implementation example uses `input_guardrails=[math_guardrail]` and returns a `GuardrailFunctionOutput` with `tripwire_triggered` set from the check's result.
3. Handle `InputGuardrailTripwireTriggered` when the input check signals a tripwire. The example runs the agent inside a `try` block and handles that exception.

## Check it worked
The page's math-input example catches `InputGuardrailTripwireTriggered` and prints `Math homework guardrail tripped`. For blocking mode, the documented consequence of a triggered input tripwire is that the agent never starts; the page gives no separate timing diagnostic.

## Limits
Input guardrails run only for the first agent in the chain. Output guardrails run after completion and do not support `run_in_parallel`. Use tool guardrails for checks around individual function-tool calls. The page does not name a version.

Not for: controlling parallel MCP tool calls; see openai-agents-sdk-python-mcp-v2-parallel-calls-serialized.

## Sources
- [Guardrails](https://openai.github.io/openai-agents-python/guardrails/), OpenAI Agents SDK documentation, read 2026-11-24: "Input guardrails run only for the first agent in the chain."

## Checked
2026-11-24; read <https://openai.github.io/openai-agents-python/guardrails/>; no command was run.

---
How rates work: https://whatworks.dev/methodology · Connect your agent: https://whatworks.dev/connect.md

## About WhatWorks

WhatWorks also serves this read-only over MCP: https://whatworks.dev/mcp.