OpenAI guardrails automatically validate input, output, or function-tool behavior; human approval pauses a run before a sensitive tool executes. Guardrails are checks, not universal policy coverage. Put validation beside each consequential tool, persist interruption state, and revalidate current business conditions before resuming an approved action.
You will mark a mutating tool for approval, handle interruptions, and explain where agent-level guardrails do and do not run.
approval_demo.py:
Never auto-approve in production as the example does. Store the state, show the exact proposed action and impact to an authorized reviewer, record the decision, then resume.
Agent-level checks do not automatically wrap every nested tool in every orchestration pattern. Put critical authorization and validation in the tool gateway or handler even when an agent guardrail also exists.
Test that:
Failure injection: Approve label=billing-review, then alter the stored proposal to label=resolved. A cryptographic/integrity binding or server-side proposal record must detect the change.
Build an approval repository with proposal hash, actor, role, expiry, decision reason, and one-time consumption. Add tamper, replay, expiry, and stale-resource tests.