openai-agents 0.26.1 (30 November 2026) keeps a rejected call rejected when another call to the same tool gets always_approve. Measured: 0.26.0 ran it.
The release and the fix that matters
The OpenAI Agents SDK for Python, version 0.26.1, was released on 30 November 2026 UTC, just after midnight on 1 December in India. It is a patch release with about twenty fixes. One of them changes what actually runs after a person reviews tool calls: pull request 6237, "Preserve explicit function call rejections when approving another call", merged the same day. A second, pull request 6228, "Preserve pending child approvals with the same local call ID", affects nested agent runs. The release notes' own review section summarises them: with always_approve=True the runner now preserves explicit rejections of other calls to the same function, and nested runs keep their pending approvals separate even when they share a local call ID.
This guide measures the first change on 0.26.0 and 0.26.1 with a scripted model and no provider call, explains the second from its source, and then turns both into rules for any approval system an agent sits behind.
How approvals work in this SDK
A tool declared with needs_approval=True pauses the run when the model calls it. The paused result lists the pending calls in result.interruptions. The application converts the result to a RunState, records decisions with state.approve(item) or state.reject(item), and resumes with Runner.run(agent, state). The SDK documentation describes two kinds of decision. Per-call decisions apply to one call identity. Passing always_approve=True or always_reject=True stores a default for subsequent calls to that tool identity; serializing the run state retains those defaults.
The question 0.26.1 answers is what happens when the two kinds meet: a reviewer rejects one call, then approves another call to the same tool and ticks "always allow".
Measured: a rejected refund that ran anyway
The companion example agents_approval_rejection defines a synthetic issue_store_credit(case_id, amount) tool with needs_approval=True and a scripted model that, in its first turn, asks for two calls: 40 for CASE-7101 and 15 for CASE-7102. Geetha reviews them. CASE-7101 looks wrong, so Geetha rejects it. CASE-7102 is routine, so Geetha approves it and ticks "always allow" so that later routine credits stop interrupting the review queue. A variant has the model ask for a third credit, CASE-7103, after the first two are resolved. Each scenario ran on both versions, installed in separate virtual environments with packages limited to those published before 1 December 2026.
| Decisions, in the order recorded | 0.26.0: credits issued | 0.26.1: credits issued |
|---|---|---|
| Reject 7101, then always approve 7102 | 7101 and 7102 | 7102 |
| Always approve 7102, then reject 7101 | 7102 | 7102 |
| Reject 7101, always approve 7102, model later asks for 7103 | 7101, 7102 and 7103 | 7102 and 7103 |
| Always approve 7102, reject 7101, model later asks for 7103 | 7102 and 7103 | 7102 and 7103 |
On 0.26.0, the rejected credit for CASE-7101 was issued whenever the "always" approval was recorded after the rejection. The order of two clicks decided whether a refund a person had explicitly refused was paid. On 0.26.1 the rejection holds in both orders. The sticky approval still does its job: the later CASE-7103 call ran without a new interruption on both versions.
Why it happened
Approval state is kept per tool identity in a record with an approved field and a rejected field. Each can be True, meaning a sticky decision for all calls, or a list of call IDs, meaning per-call decisions. The per-call rejection put the ID of CASE-7101's call into the rejected list. In 0.26.0, recording the sticky approval replaced the rejected-call list with an empty list. The explicit rejection was therefore lost before the execution check.
So the explicit rejection disappeared, and the sticky approved = True covered the call. The 0.26.1 change keeps the rejected list and removes only the ID of the call being approved. As the new comment in run_context.py puts it, "A new default only overrides the exact denial for this call."
Nested runs and reused call IDs
The second fix concerns agents used as tools. When an outer agent calls an inner agent with Agent.as_tool(), the inner run's tool calls can need approval, and those approvals surface in the outer run's interruptions. Call IDs are generated per run, so two nested runs can produce the same local call ID. Before 0.26.1, the code that collected pending approvals keyed them by call ID, so a second child approval with the same ID was treated as a duplicate and dropped from the pending list. The fix keys child approvals by the approval item itself. This part was read in the change and its tests, not measured here.
Rules for any approval layer in front of an agent
These are not specific to one SDK. They are what the two bugs teach.
- An explicit rejection outranks any default. A rule like "always allow this tool" must never re-enable a call a person refused. Store per-call decisions and defaults separately, and check per-call decisions first.
- The result must not depend on click order. If two decisions are recorded in different orders, the executed set should be the same. Test both orders.
- Approval keys must be unique across the whole run tree. A call ID is only unique within one model response or one run. Key approvals by something globally unique, such as run ID plus call ID, or the approval object itself.
- Defaults should be narrow. "Always allow
issue_store_credit" is broad. A default scoped by amount, case type or customer limits what a mistaken click can do. With this SDK,needs_approvalcan be an async function that decides per call, which is the place for such rules. - Log the decision with the effect. Write the reviewer, the decision, the call ID and the arguments next to the ledger entry the tool created. A credit without a matching approval record is the audit signal for this class of bug.
What a reviewer screen should show
The bug also says something about the interface in front of the approvals. A reviewer who ticks "always allow" while another call to the same tool sits rejected on the same screen is making two decisions that interact, and the screen should make that visible. Show the pending calls grouped by tool, show which ones already have a decision, and when a sticky approval is about to be recorded, list the rejected calls it must not override. Record the decision and the screen state together, so an audit can tell what the reviewer saw when they clicked.
Upgrading
Upgrade to 0.26.1 or later if you use always_approve or always_reject together with per-call decisions, or if you approve tools inside nested agents. Then check history. Approval records in your own logs, joined against tool executions, show whether a call that a reviewer rejected was executed anyway. On the affected 0.26.0 version tested here, look for runs where a rejection and a sticky approval for the same tool were recorded in the same resume, rejection first.
If your application never uses sticky decisions, the first bug cannot occur. If you serialise RunState and resume on a different worker, upgrade every worker that may resume a run, so that decisions recorded under one version are not applied under another.
How to verify it
Write the test the companion example contains: a scripted model that requests two calls to one approval-gated tool, a rejection of one, a sticky approval of the other, in both orders, and an assertion on what actually executed. Add a nested-agent case where two child runs reuse a call ID and assert that both approvals surface. Run the tests on every SDK upgrade, because approval code changes often. The SDK repository added its own documentation on testing approvals and rejections in the same release, in docs/testing.md.