Practical technical guides / Recent: OpenAI Agents SDK 0.26.0 (2026-11-24)

Stop Queued Agent Tools When an Input Guardrail Rejects Work

The November 24 Agents SDK 0.26.0 fix closes queued-tool admission after rejection; running effects still require reconciliation.

By Sandeep Belgavi · Published 2026-11-25 · Prepared 2026-11-24

Admission after an input verdict
Original explanatory diagram; synthetic values where shown.

The November 24 Agents SDK 0.26.0 fix closes queued-tool admission after rejection; running effects still require reconciliation.

A rejected run must stop admitting queued tools

OpenAI Agents SDK 0.26.0 was published on November 24, 2026 at 03:15 UTC. Its release notes include a fix that stops queued function tools after an input guardrail rejects the run. The implementation change matters when model work and guardrail evaluation overlap: rejecting the overall answer is insufficient if additional tool calls can still begin from a queue.

The practical lesson is about admission timing. A queued tool has not started and can still be withheld. A running tool may already have performed an effect, and cancellation is not a time machine. The release notes recommend run_in_parallel=False when input must be checked before any tool starts. This article examines that boundary and uses a separate synthetic scheduler to make the race visible.

The stable 0.26.0 release and the 1.0 alpha previews are separate release lines. Do not infer that installing one includes the other's persisted-state APIs. Pin the exact version used by your application and verify its documentation and tests. The offline scheduler described here does not import the SDK and is not evidence of a provider call or an SDK integration test.

Distinguish pending, admitted and completed work

Model output can describe several tool calls before all of them have execution capacity. A scheduler may admit only a bounded number at once and retain the rest in a queue. Track each call as queued, running, completed, failed or cancelled, and record whether an external effect is known to have occurred. A single cancelled flag cannot express all of those facts.

An input guardrail checks the input to a run. It is different from validating a particular tool's arguments and different from checking the final response. These controls can cooperate, but they should not be substituted for one another. If a tool writes data, its own authorization and argument checks still belong at the execution boundary.

The upstream change introduces a run-local gate that records rejection and checks it during function-tool scheduling. The source also contains cancellation coordination and tests around concurrent behavior. This is a software fix with a bounded scope, not a claim that every hosted tool or external process can be undone once the run is rejected.

Walk through a queue race

Use three synthetic tools with one execution slot. Tool A starts at time zero and records an effect at time two. The input guardrail rejects at time three. Tool A finishes cleanup at time four, while tools B and C remain queued. A scheduler that merely waits for A to finish and then fills the available slot can incorrectly start B after rejection.

The guarded scheduler sets a monotonic rejection flag as soon as the rejecting verdict is observed. Slot filling checks that flag before admitting another call. At time four, the empty slot remains empty; B and C are reported as skipped because of input rejection. The recorded effect from A at time two remains in the outcome and requires whatever reconciliation the application supports.

Now move rejection to time one. If A's effect at time two is cooperatively cancellable before it occurs, the scheduler can prevent it. If A already sent an irreversible external request at time zero, cancellation may not prevent the remote effect. The fixture should model those cases separately rather than always awarding cancellation a perfect outcome.

Choose blocking validation when the boundary requires it

Parallel input validation can reduce latency for inputs that pass, because model work begins before the guardrail finishes. The tradeoff is speculative work. For an application whose policy forbids any tool execution before input acceptance, a blocking guardrail is the simpler contract. Saving a small amount of latency is not a reason to misstate that requirement.

The SDK's documented input-guardrail setting run_in_parallel=False makes the input check precede the agent's execution. Verify the exact API form in the pinned release before copying configuration. Do not describe the default parallel mode as equivalent just because the final run raises a tripwire exception when rejection occurs.

A hybrid design can also separate planning from effects. Allow speculative read-only analysis in one phase, then require an accepted input verdict and validated plan before entering a write-capable phase. This is an application architecture, not a guarantee supplied by the name guardrail. The boundary must be enforced by tool availability and admission checks rather than by a prompt instruction alone.

Build a scheduler model with visible assumptions

The synthetic model orders events by timestamp and a documented tie-breaking rule. Rejection at the same timestamp as admission is processed first. Tool calls have a duration and an effect time. A toggle controls whether a running call respects cancellation before its effect. These assumptions let the reader explain each result instead of treating the output as a benchmark.

# Author: Sandeep Belgavi. Illustrative admission gate.
class Gate:
    def __init__(self):
        self.rejected = False

    def reject(self):
        self.rejected = True

    def may_start(self):
        return not self.rejected

def fill_slot(queue, gate):
    if not queue or not gate.may_start():
        return None
    return queue.pop(0)

This minimal gate demonstrates the invariant but omits real concurrency synchronization, asynchronous cancellation and durable state. In a real runner, rejection must be visible across every scheduling path, including resumed work and nested execution where applicable. A second unchecked route to tool execution can invalidate the entire policy even if the main queue is correct.

Use a run-scoped gate. A global flag can reject unrelated requests or remain set after a run ends. Resetting the gate too early can permit late tasks from the old run. Lifetime management and task ownership are part of the design, especially when cleanup continues after the caller receives an error.

Preserve evidence of work that already happened

When rejection occurs, record the verdict time, queued calls skipped, active calls signalled and known completed effects. Do not label every call cancelled when some completed before the verdict. An operator needs to distinguish no action, possible action and confirmed action when deciding whether to retry.

An external service may accept a request and lose the response. A cancellation signal to the local coroutine does not resolve that ambiguity. Use operation identifiers and service-specific status checks or idempotency mechanisms. If compensation exists, treat it as a new authorized operation with its own failure path rather than assuming rejection automatically rolls everything back.

Keep sensitive input and tool arguments out of routine traces unless the application explicitly needs them and has an appropriate retention policy. Often identifiers, state transitions, timestamps and result categories are enough to diagnose admission errors. A guardrail improvement should not create an unnecessary collection of rejected private input in telemetry.

Verify the regression and the remaining limit

Test rejection before any tool starts, rejection while one tool runs, rejection after one tool completes and rejection at the exact time a slot becomes available. The core invariant is that no queued function tool is admitted after the gate records rejection. Independently assert which earlier effects remain possible under the fixture's cancellation model.

Test a passing guardrail to ensure all intended tools can still execute. Test two simultaneous runs to detect cross-run flag leakage. Test cleanup that takes longer than expected so a repeated cancellation does not accidentally restart admission or erase the original failure. These are scheduler properties, not accuracy measurements of the guardrail model.

For an application upgrade, run the upstream-compatible integration scenario on the pinned SDK with synthetic tools before enabling it in a real workflow. Inspect the release's guardrail documentation and relevant commit, then retain the observed result separately from this offline model. The fix closes an admission race; choosing a policy that requires validation before effects remains the application's responsibility.

Run the example yourself

The synthetic fixtures, expected output and tests behind this guide are in the companion code on GitHub; its README lists the prerequisites, exact commands, expected output and limits.

Primary references and authorship

Sources checked 2026-11-24. Original explanation and synthetic examples by Sandeep Belgavi. Views are my own and do not represent any employer, past or present.