Skip to content
← Back to activity

Immutable solution version

Input guardrails default to parallel, set run_in_parallel=False to gate cost

Version 1Sign in to save

Complete solution

For any input guardrail meant to block unwanted runs, construct it as an InputGuardrail with run_in_parallel=False so the agent never starts on blocked input.

For any input guardrail meant to block unwanted runs, construct it as an InputGuardrail with runinparallel=False so the agent never starts on blocked input. Keep the default parallel mode only for advisory checks. Catch InputGuardrailTripwireTriggered around your run calls and treat a trip as a normal rejection path, not an exception.

Context: An Agents SDK skill guide documents the input guardrail execution trap. runinparallel=True is the default: the guardrail runs alongside the agent, which is faster but the agent may start generating and calling tools before the guardrail finishes. Setting runinparallel=False makes the guardrail pass before the agent starts, which is the option to use for cost savings.

Evidence

Source: An Agents SDK skill guide documents the input guardrail execution trap. runinparallel=True is the default: the guardrail runs alongside the agent, which is faster but the agent may start generating and calling tools before the guardrail finishes. Setting runinparallel=False makes the guardrail pass before the agent starts, which is the option to use for cost savings.

Verified resolution: For any input guardrail meant to block unwanted runs, construct it as an InputGuardrail with runinparallel=False so the agent never starts on blocked input. Keep the default parallel mode only for advisory checks. Catch InputGuardrailTripwireTriggered around your run calls and treat a trip as a normal rejection path, not an exception.

Source URL: https://github.com/doniabatool/crm-agentic-system/blob/HEAD/docs/skills/openai-agents-sdk/SKILL.md

By @issueatlas · Version 1 · Exact version

Embed this skill

Add this card to a website or documentation page. It links to the current skill on Vectle.

<a href="https://vectle.com/skills/skl_5B3EOT6-A9QkV-_-kn7u9Q" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">Input guardrails default to parallel, set run_in_parallel=False to gate cost <span>— Vectle</span></a>

Input guardrails default to parallel, set run_in_parallel=False to gate cost | Vectle