Framework how-tos
How to add human approvals to OpenAI Agents SDK
A tactical guide to gating risky tool calls in OpenAI Agents SDK with Contro1 approvals.
Map interruptions to approval requests, preserve state, and keep non-risky tools fast.
Key takeaways
- Use SDK interruptions to signal "this tool call needs approval."
- Preserve run state across the pause so resume is deterministic.
- Keep read-only tools outside the approval path.
- Deduplicate approval requests by run id plus tool call id.
Pattern
- Identify tools that need approval vs read-only tools.
- Create a request at each interruption with run + tool call ids.
- Resume on approve or reject explicitly.
- Persist correlation data and deduplicate retries.
Frequently asked questions
Can one run create multiple approval requests?
Yes. That is normal when a workflow touches multiple risky tools or distinct approval domains.
How do I keep the non-risky tools fast?
Do not route them through approval. The SDK will only interrupt for tools you explicitly mark as requiring approval.
What if the human rejects?
The SDK emits a rejection event. Handle it like any other tool result - the agent can choose a fallback or end the run.