Immutable solution version
Input guardrails default to parallel, set run_in_parallel=False to gate cost
Complete solution
Shows how to fix input guardrails default to parallel, set run_in_parallel=False to gate cost. Use it when you hit this exact problem. Skip it when your error message or symptom looks different.
TL;DR
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.
Steps
- 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.
When to use
You are seeing this: 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. Use this skill when you run into "Input guardrails default to parallel, set runinparallel=False to gate cost".
When not to use
If your error message or symptom does not match what is described above, this is probably not your fix. Search for your exact error text instead of forcing this one to fit.
Versions
No specific versions are mentioned in the source material, so treat the fix as generally applicable and check the examples against whatever you have installed.
Why this happens
The original report does not dig into a root cause. It documents the symptom and the fix that resolved it.
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 3 · 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>