published fresh until

OpenAI Agents JS 0.19→0.20: why does approval resume stop?

Summary OpenAI Agents JS 0.20.0 counts model calls after approval resumes toward maxTurns; budget for the final response. Python openai-agents 0.24.0 fixes Conversations batching and nested tracing opt-out (checked 2026-10-20).

Not for model retirements, see openai-gpt-6-1-shutdowns-responses-prompts-audio-image-migration; choosing a framework, see agent-framework-or-plain-sdk-for-python-ts-dotnet-or-java-2026

For your agent
claude mcp add --transport http --scope user whatworks https://whatworks.dev/mcp

Read-only, no account. Sign-in is only for trial reports: /connect.md

What this thread does

As of November 2026; checked 2026-11-24. JS core 0.22.0, November 12, retains saved-state schema 1.23 when compatible and uses 1.24 for richer metadata or newer nested runs; narrow usage details before arithmetic. JS core 0.21.0, October 20, removed the Runloop sandbox API.

The problem

Your OpenAI Agents SDK app pauses for approval, then hits its turn limit after upgrading. Its Python service also needs history and tracing fixes. This covers upgrading an existing app.

Versions and licences

PackageVerified releaseLicenceOfficial evidence
openai-agents0.24.0, released 2026-10-15 (checked 2026-10-20)MIT (checked 2026-10-20)PyPI
@openai/agents and core0.20.0, released 2026-10-08 (checked 2026-10-20)MIT (checked 2026-10-20)Releases, manifest

JS 0.19.0 → 0.20.0 and Python 0.23.1 → 0.24.0 (both transitions checked 2026-10-20) are separate version lines. Retain your configured model.

What changed

  • On 2026-10-08 (checked 2026-10-20), JS made model calls after approval resumes consume maxTurns. Automatic MCP discovery defaults to 64 pages; use maxListPages for larger listings. Older hosted MCP history containing only a namespace needs rediscovery. Official core release notes.
  • On 2026-10-15 (checked 2026-10-20), Python added run-wide tool error formatting and fixed Conversations writes, compaction during pending approvals, restoration of function-call aliases and agent ownership, and tracing opt-out inside caller traces. No blanket handoff API replacement is announced. Official release notes.
  • The Conversations fix merged on 2026-10-08 (checked 2026-10-20). It sends sequential batches of at most 20 items. Multi-request writes remain non-atomic; reconcile saved history after a partial failure before retrying. Official recovery explanation.

What breaks

A JS approval resume at the previous budget can throw MaxTurnsExceededError. The documented default is 10 model turns; handoffs continue the loop. JS runner, checked 2026-10-20.

Before the Python fix, a long Conversations append could exceed the item limit. The report captured oversized requests with a mock transport, not a live rejection; there is no verified HTTP error string for that case. Report, checked 2026-10-20.

Traces may become sparser because RunConfig(tracing_disabled=True) now suppresses run spans inside caller traces too. Official fix, checked 2026-10-20.

How to migrate

1. Record dependencies with python -m pip show openai-agents openai and npm ls @openai/agents @openai/agents-core @openai/agents-openai @openai/agents-realtime. Retain the lockfile and representative paused states. 2. On an application branch, use python -m pip install "openai-agents==0.24.0" and npm install --save-exact @openai/agents@0.20.0 (versions checked 2026-10-20). Align directly installed split JS packages. These commands combine verified package names and release pins; they were not executed here. 3. Count model calls before and after approval. For an existing JS RunState, use await run(agent, state, { maxTurns: 12 }) if 12 covers your workflow; it is an illustrative finite budget. Python uses max_turns. JS runner, Python runner (checked 2026-10-20). 4. Choose one history owner. Python conversation_id / JS conversationId reuse server history; send the new turn. Python OpenAIConversationsSession uses session=session. Do not wrap it in OpenAIResponsesCompactionSession. Reconcile partial writes before resuming. Conversation guide, sessions (checked 2026-10-20). 5. Audit handoff boundaries. Input guardrails run on the initial agent; output guardrails on the final agent. Python run_in_parallel=False completes input checks before model/tool work. Tool guardrails protect function invocations; handoff calls themselves bypass that pipeline. Guardrails, handoffs (checked 2026-10-20). 6. Keep intentional tracing policy, then test standalone and caller-trace execution with RunConfig(tracing_disabled=True). Fix, checked 2026-10-20.

What to test

FixtureAcceptance check
Approval at the final allowed turnFollow-up consumes budget; sufficient finite budget completes
Pause, serialize, restore, hand offCorrect agent and function alias; each side effect runs once
Append 20, 21 and 41 itemsOrdered batches; failure does not duplicate saved prefix
Blocking input rejectionNo specialist or side-effecting tool runs
Disabled run inside caller traceCaller spans remain; disabled run spans are absent

These are proposed tests, not results.

Community evidence

  • Tivonsico's issue #5333, opened 2026-10-07 (checked 2026-10-20), captures oversized requests. Its caveat is “No model or live API request is used.” The batching fix closed it.
  • chrikrah's issue #5289, opened 2026-10-03 (checked 2026-10-20), reproduces disabled runs adding tool and handoff spans inside an enclosing trace. The linked fix confirms the specific nesting case.

Pitfalls

Unlimited turns hide loops. Replaying tools after a history-write failure repeats side effects. A handoff is not automatically an input-check boundary. Sparse traces do not prove execution failed. Updating the base openai client alone does not update either Agents SDK.

A prompt to give your agent

Your training data predates these changes. Read the linked official JS and Python release notes, runner and session guides before editing; do not guess option names, model IDs or flags. Inspect our lockfiles and approval-resume path. Make the smallest SDK upgrade, count model turns and retain the configured model. Test restored handoffs, blocking guardrails, partial writes and nested tracing with fake tools. Report installed packages and untested paths. Never replay real side effects to repair history.

Separate preview line

OpenAI's Python 0.24.0-alpha.6, November 3, is a GitHub-wheel preview, not the 0.24.0 upgrade above: use Agent.run() / Agent.run_sync(); its Runner aliases are removed, Turn.get_result() replaces wait methods, and Turn.cancel() / Session.cancel_all() replace Session.interrupt(). Do not apply these removals to stable code.

Limits

Checked 2026-10-20. No packages installed, SDK code executed, API calls made or migrations run. JS release identity comes from GitHub; its npm page could not be fetched, so the npm dist-tag is unverified. Issue reports establish specific regressions, not popularity or performance. No shutdown is announced in these notes. Earlier Python upgrades may require additional changes.

Started from a post by @OpenAI, packaged by the editor. Original post

Subjects

For agents

Copy a short instruction for an agent that has WhatWorks connected, or open this page as Markdown.

# OpenAI Agents JS 0.19→0.20: why does approval resume stop?
Summary: OpenAI Agents JS 0.20.0 counts model calls after approval resumes toward maxTurns; budget for the final response. Python openai-agents 0.24.0 fixes Conversations batching and nested tracing opt-out (checked 2026-10-20).
Copy for agent
get the whatworks thread openai-agents-js-019-to-020-approval-resume-python-upgrade and help me try it

Follow this thread

Following tells you when the verdict changes, a new version ships or a new option is added. Your agent mentions it the next time you ask WhatWorks.

Sign in with GitHub to follow. Nothing is posted for you.

Sign in with GitHub

Or ask your agent
follow the whatworks thread openai-agents-js-019-to-020-approval-resume-python-upgrade
WhatWorks

Connect your agent MCP

Paste this into your agent

Connect me to WhatWorks: add https://whatworks.dev/mcp/login and sign me in so I have an account. Steps: https://whatworks.dev/connect.md.

Or run this in your terminal
  • Claude Codeclaude mcp add --transport http --scope user whatworks https://whatworks.dev/mcp/login && claude mcp login whatworks
  • Codexcodex mcp add whatworks --url https://whatworks.dev/mcp/login && codex mcp login whatworks