Someone taps Approve. The agent resumes. The tool never runs, and the same approval request arrives again a second later. Nothing is logged, nothing is thrown, nothing lands in your error tracker — because from the framework's point of view nothing went wrong. It looked for an approval matching the pending tool call, did not find one, and did the safe thing: it paused and asked again.
That is the worst possible failure mode for a permission gate. A gate that breaks loudly gets fixed on the first day. A gate that forgets decisions teaches your operators that the button is flaky, and they start double-tapping it — which is how you end up with the opposite bug.
This is not hypothetical, and it is not one careless bug. In the OpenAI Agents SDK for Python, an August 2026 report titled Tool approval is not honored on resume when Runner.run is given a context came with a deterministic reproduction: five context-bearing configurations, five failures, 100% of runs, while the context-free control passed every time. It raised no exception. The tool simply never executed and the agent re-interrupted. The fix shipped in v0.20.0 alongside several other approval and resume identity fixes — which is the detail that made us pay attention. If one release has to fix several of these at once, the bug is not in the code. It is in the contract.
The decision was bound to something that cannot be serialised
The documented API is fine, and worth stating precisely so it is clear the problem is somewhere else. You mark a tool with needs_approval — available on function_tool, Agent.as_tool, ShellTool and ApplyPatchTool, as either a boolean or an async function that decides per call. When the agent reaches that tool, the SDK records an approval interruption instead of executing it, and the run result hands you interruptions plus a resumable state. You call state.approve(interruption) or state.reject(interruption), then resume with Runner.run(agent, state). To survive a restart, you persist with state.to_json() and rehydrate with RunState.from_json(agent, blob).
Read that sequence again and notice that the human decision happens in the middle of it. In anything real, the pause and the resume are not the same process. The agent pauses on a worker, the state goes into Postgres, a person gets a Slack message twenty minutes later, and some other worker picks it up. The serialise-and-restore step is not an edge case for durability nerds. It is the normal path.
So what does approve() actually match against? The root-cause analysis on a later issue in the same repository spells it out. A pending Agent.as_tool() run is serialised with the tool's own agent as the root of its nested state. On approve(), the matching helper compares the two agents by object identity and returns false, so no nested state is found that owns the approval. The decision is recorded against nothing.
Object identity is precisely the one property of a Python object that is guaranteed not to survive to_json() and from_json(). Rebuilding from a blob creates new objects by definition. So the match works perfectly in a single-process demo, where the objects really are the same objects, and fails as soon as the state goes through storage — which is to say, as soon as you ship it.
The resume boundary — what crosses it and what does not

Four boundaries, one question
What convinced us this was a design problem rather than a bug was watching it reappear. The context case was fixed in v0.20.0. Version 0.24.0 landed on 15 October 2026 with new RunState snapshots at schema 1.21, and its own fixes included preserving function-call aliases across restoration and preserving agent ownership across hook state changes. Issues filed against 0.24.0 were still finding new corners of the same defect.
- Two agents with the same name— a nested approval is never applied after a JSON round trip when agent names repeat and the pending call belongs to the second one. A sibling issue reports
RunState.from_jsonresuming the wrong same-name agent when hook state changes. A name is not an identifier, and in a graph assembled from reusable sub-agents, repeated names are the default, not the accident. - Approval raised inside an agent-as-tool —
ToolContext.approve_tool()has been reported silently dropping the decision for a nested agent-as-tool approval, logged as a regression from an earlier fix. Delegation means the component that surfaces the interruption and the component that owns it are different objects at different depths. - Work that completed before the pause— one fix is titled, flatly, “preserve completed tool results when resuming approvals”. Another issue describes deferred items from the interrupted turn never being persisted, leaving an orphaned
function_call_outputin the session. An interrupted turn is usually a partially completed turn, and the half that already succeeded has to be preserved exactly. - Durable execution— a Temporal integration issue reports a
RunStaterebuilt from a string and resumed inside a workflow hanging on approvals after continue-as-new. Durable engines replay and re-enter; a contract that only holds within one continuous execution does not survive them.
One more is worth quoting because of what the error message admits. Filed against 0.24.0, a report of serialised approval checkpoints that cannot be resumed when the parent agent has an output guardrail and the approval came from an agent used as a tool. The failure is: "Cannot resume a serialized approval checkpoint with output guardrails because the current response boundary cannot be proven." Cannot be proven. The framework is telling you, in production, that it is trying to deduce a fact it was never given.
“An approval is not a message. It is a transition between two states that may not share a process, a memory space, or a clock.”
Bind the approval to a key you wrote down
The direction of the upstream fixes is the useful part, and we copied it rather than inventing something. The patch for the guardrail case introduces RunState schema 1.22, which records that a pending approval belongs to a nested run, and on restore verifies that the child actually owns the approval instead of independently re-deriving it. That is the whole lesson in one diff: stop inferring ownership, store it.
In our own gates we never let an approval reference a live object. It references a record, and the record is the contract. Everything in it has to be reconstructible from the blob alone.
Two of those lines do most of the work. argsHash over canonicalised arguments means an approval authorises one invocation, not a tool — if the model retries the same tool with a different amount or a different recipient, that is a new decision, and the old record must not cover it. And agentPath instead of an agent name is what makes the record survive a graph where the same sub-agent appears twice.
The throw is the part people leave out, and it is the part that would have caught every issue described above on day one. If you hold approval records and none of them matches the pending call, you have exactly two possibilities: the human decided about something else, or your matching is broken. Both deserve a page. Neither deserves a silent re-prompt, which is the behaviour that let these bugs sit in production long enough to be filed by strangers.

What we check before we ship an approval gate
We are not writing this from a position of having got it right first time. Our own approval gate — plain job queue, Telegram buttons, no agent SDK involved — shipped with two bugs from exactly this family, and both took live traffic to find.
The first: on approval, a job went back to pending carrying the expires_at it was given when it was created. A separate janitor job swept rows that were pending and past their expiry and marked them expired. So a human would approve something, and if they had taken longer than the original window to answer, the work would vanish — approved, swept, no error anywhere. The second was a race. The approval workflow marked the job done, and a worker step that was still in flight wrote it back to needs_approval afterwards, so every decided job of one class sat in needs_approval forever waiting for a decision that had already been made.
Neither is an agent bug. Both are the same bug as the SDK's: two components disagreeing about who owns a row's state after a decision, with no component responsible for noticing the disagreement. That is why the checklist below is framework-agnostic.
- 1Test the round trip, not the pause— serialise, restore in a fresh process, approve, resume. A test that approves against the in-memory state proves only that identity comparison works on identical objects, which it always does. Run the same test with two sub-agents sharing a name.
- 2An unmatched approval is an incident— records present, none matching, is a thrown error with both sides logged. Never a pause.
- 3Re-extend every deadline on resume— a decision resets the clock. Anything that reaps stale work must not be able to reap something a human has already signed off.
- 4One decision, one invocation— bind to a hash of canonicalised arguments and a call id. Changed arguments require a fresh approval, and a replayed approval must execute at most once.
- 5Make the terminal state terminal— once a row is decided, no later-arriving step may write it back to awaiting-decision. Our fix was a single
AND status = ’running’in the query that parks a job; the principle is that only one component owns the transition.
Pin your SDK version and read the approval and resume entries in its changelog before you upgrade, because this contract is still moving — schema 1.21 in October, schema 1.22 in the fix queue at the time of writing. But do not treat that as the mitigation. The mitigation is that your gate holds its own record, matches on fields that exist in the blob, and shouts when the match fails. Then the next variant of this bug costs you an alert instead of an audit.
If you only change one thing this week, change the fall-through. Find the branch where your system has approvals it cannot match and asks the human again, and make it throw. You will learn more in a day than from any amount of reading about state machines.









