AgentOps
Managed Tool Approvals in OpenAI Agents SDK alpha.8
Codesprint Consulting
By,Codesprint Consulting
  • 16 November 2026

Managed tool approvals are the headline of OpenAI Agents SDK v0.24.0-alpha.8, released on November 16, 2026, and they answer a question every team shipping agents eventually hits: how do you let an agent propose an action while a human, or your own policy code, keeps the final say on whether it runs? The alpha.8 release adds a managed approval flow for Python function tools, native Realtime voice sessions, application-owned model clients, and checkpoint restores that remember spent budgets. This post walks through how managed tool approvals actually work, the guard-ordering details that decide whether they are safe, what suspend-and-resume does with a pending approval, the limits you should know before designing around the feature, and the upgrade notes worth reading twice. Source: Agents SDK v0.24.0-alpha.8 release notes, GitHub

What managed tool approvals are

A managed approval pauses a Python function tool before its callback runs. The application gets a request object containing the proposed arguments, inspects them, and then approves or rejects the call. Approving runs the registered callback. Rejecting returns a failed tool result to the model without calling the function at all. The request belongs to its original Session, Turn, and call, so a second decision on the same request, or a decision on an expired request, fails instead of double-executing. Source: Managed function approvals example, openai-agents-python

The feature is opt-in per tool. You mark a function with needs_approval=True and the SDK handles the pause, the request object, and the resume. It also accepts a synchronous or asynchronous predicate that receives the ToolContext, so you can require approval only when it matters: a refund above a threshold, a write to a production table, a message leaving the company. When the predicate returns false, the function runs without asking the application. Source: Managed function approvals example, openai-agents-python

The approval flow, step by step

The mechanics are compact. Set @function_tool(needs_approval=True). When the model calls the tool, the SDK raises a FunctionToolApprovalRequest, which your code reads from session.interactions(). You inspect arguments and effective_arguments, then await approve() or reject(reason). A one-shot handler can instead return request.reply(FunctionToolApprovalDecision(approve=True)). Both types, FunctionToolApprovalRequest and FunctionToolApprovalDecision, are imported from agents, and they are separate from ApprovalRequest, which handles native command and MCP approval requests. Source: Managed function approvals example, openai-agents-python

If you run one-shot agent.run() without an interaction handler and a required approval appears, the SDK raises InteractionRequired and hands you a portable state object. That is the escape hatch for scripts and CI jobs: nothing executes silently, and you can decide later, in another process, with the state in hand. Source: Managed function approvals example, openai-agents-python

Where the guards sit, and why ordering matters

The detail that decides whether approvals are actually safe is where the input guard runs. By default, the input guard runs after approval, immediately before the callback. That default has a subtle consequence: the human approves the raw arguments, then the guard gets a chance to replace them. With run_input_policy_before_approval=True, the input guard also runs before the approval predicate, and a replacement from that first check becomes the request's effective input, which is what the approver sees. Source: Managed function approvals example, openai-agents-python

After approval, the SDK repeats the input guard and rejects any replacement whose effective arguments differ from what was approved. In plain terms: you cannot quietly swap the checked arguments for different ones between the human's yes and the function call. Output guards run only after the callback executes. For teams building approval queues, this ordering story is the strongest part of the design, because it closes the classic time-of-check to time-of-use gap between review and execution. Source: Managed function approvals example, openai-agents-python

Remembering a decision for the rest of a Session

Approve or reject with always=True and the SDK remembers the decision for the current Session. The scoping is deliberately narrow: the memory binds to the captured function declaration and the Agent binding, not to a name. It does not carry into a new Session, and it does not grant permission to a different declaration that happens to share the same function name. Input guards still run before every execution, so a remembered approval is not a blanket pass through your policy code. Source: Managed function approvals example, openai-agents-python

This is the right default for agent work. A human who approves "query the analytics database" once probably means it for this working session on this task, not forever, and not for every tool with a similar name. If your organization has been working through zero standing privilege for AI agents, session-scoped memory is the same philosophy expressed inside an SDK: authority is narrow, recent, and re-earned.

Suspend, resume, and what restore refuses to do

Approvals rarely get answered in milliseconds. For a pause that lasts minutes or hours, await session.suspend() while the approval is pending and store the returned SessionState somewhere safe. Reopen it later with agent.session(state=state) plus your current trusted function declarations. Two design decisions stand out. First, the saved pending requirement still needs a decision even if your current predicate now returns false, so a policy change cannot silently wave through an old request. Second, restore never serializes a callback and never grants authority from conversation history; a resumed session re-derives trust from your code, not from what the transcript claims. Source: Managed function approvals example, openai-agents-python

Accepted sibling results are retained across the suspend, so approved work that finished before the pause is not redone. The example is equally clear about what portable snapshots do not do: they do not coordinate independent writers, and they do not make uncertain effects safe to retry. Approval also cannot roll back an effect once the callback has started; cancellation waits for callback cleanup. Live Realtime voice calls use the same approval decisions and guard checks, and closing the voice operation expires its pending request. Source: Managed function approvals example, openai-agents-python

What alpha.8 does not cover yet

The example documentation is honest about scope. Managed function approvals in alpha.8 support bare Python function tools. They do not add managed MCP approvals, nested guarded restore, namespaced or generated-code approvals, Computer approvals, or persistent-store composition in this flow. The separate manual_tool() API remains the way to supply an application result directly rather than approve an SDK callback. If your approval surface is mostly MCP tools today, you are still on the native ApprovalRequest path, and it is worth checking how those requests surface before assuming the new flow covers them. Source: Managed function approvals example, openai-agents-python

Coverage gaps like this are where most real-world agent incidents live, a pattern we laid out in our AI agent security checklist: the control exists, but only on part of the tool surface. Audit which of your tools are Python functions, which are MCP, and which are native commands before you declare the approval problem solved. Related ground: least privilege for AI agents covers the permission side of the same design.

The rest of alpha.8 in brief

The release is larger than approvals. Realtime voice can now attach to a Session through a server WebSocket, a browser over WebRTC, or an existing SIP call, using native APIs from agents.realtime.native. The native tool loop works with application-owned model clients: async Responses and Chat Completions clients, LiteLLM, AnyLLM, and custom adapters. Checkpointing now covers supported pending tool requests and approvals, and request and token budgets are preserved across a restore so usage already spent still counts. Linux support widened with an ARM64 wheel, and both Linux wheels require glibc 2.28 or newer. Source: Agents SDK v0.24.0-alpha.8 release notes, GitHub

Upgrade notes worth reading twice

Three items in the upgrade section deserve attention before you bump the version. First, back up saved state: alpha.8 writes a checkpoint format that preserves request and token budgets, and alpha.7 rejects that format because it cannot enforce the saved budget, so a rollback without a backup can strand saved sessions. OpenAI says it verified that both versions reopen idle checkpoints, checkpoints waiting for a manual Python tool reply, and closed LocalStorage profiles on Linux x86-64. Second, bare asterisk entries in network domain rules must become exact hosts or scoped patterns; NetworkPolicy.allow_all() is the explicit escape, and explicit network policies remain unsupported on Windows. Third, if you read session.items() for analytics, count each execution once, because provider function_call rows can accompany a typed record for the same execution. Source: Agents SDK v0.24.0-alpha.8 release notes, GitHub

Two smaller notes: a saved Codex login now supplies model authentication only, so ChatGPT Apps tools need an explicit ChatGPTAppsMCP declaration with the provisioned Apps token, and the Classic WorkspaceJsonlSink default budget is now 8 MiB, with pending events dropped and the sink permanently stopped if you exceed it. Source: Agents SDK v0.24.0-alpha.8 release notes, GitHub

Why this matters

Human-in-the-loop controls have mostly lived outside SDKs: teams wrap tools in their own checks, build approval queues by hand, and hope the wrapper and the guard stay in sync. Managed tool approvals pull the pause, the inspection object, the decision memory, and the durable suspend into the SDK itself, with guard ordering that protects the moment between review and execution. Combined with the release's observation hooks for hosted MCP approval decisions, the direction is clear: approval is becoming a first-class runtime concept rather than application glue. Source: Agents SDK v0.24.0-alpha.8 release notes, GitHub

Our read

Our read: this is the most practically useful alpha.8 feature for production agent teams, more than the voice work, because approval flow bugs are the ones that end deployments. The guard-ordering design (approve the effective arguments, re-check before execution) is the part to copy even if you never use this SDK. Two cautions from our assessment: the MCP gap means most tool-heavy stacks are only partially covered today, and the always=True memory is convenient enough that teams will overuse it, so decide your policy for remembered approvals before your first incident does it for you. Start by marking irreversible, money-moving, or external-communication tools as needs_approval with predicates, and keep the rest automatic.

FAQ

They are a new alpha.8 flow that pauses a Python function tool before its callback runs, hands the application a request object with the proposed arguments, and waits for an approve or reject decision. Approving runs the callback; rejecting returns a failed tool result without executing anything.

Mark the function with @function_tool(needs_approval=True), or pass a predicate that receives the ToolContext and returns true only when a human or policy check should run. Your code then reads FunctionToolApprovalRequest from session.interactions() and calls approve() or reject(reason).

Yes. approve(always=True) or reject(reason, always=True) remembers the decision for the current Session only. The memory binds to that exact function declaration and Agent binding, does not transfer to a new Session, and input guards still run before every execution.

Yes. Await session.suspend() with the approval pending, store the returned SessionState securely, and reopen later with agent.session(state=state). The pending request still requires a decision after restore, and a one-shot run without a handler raises InteractionRequired with a portable state instead of executing.

No. The managed function approval flow supports bare Python function tools in this release. Native command and MCP approvals use the separate ApprovalRequest path, and managed MCP approvals are listed among the capabilities the example does not add yet.

Tag:
  • managed tool approvals
  • openai agents sdk
  • human in the loop
  • agent governance
  • tool approvals

Have a project in mind? Let's talk.

Drop Us a Line

Connect with Codesprint Consulting

Ready to take the first step towards unlocking opportunities, realizing goals, and embracing innovation? We're here and eager to connect.

Your Success Starts Here!