pypi / openai-agents
openai-agents
What changed in openai-agents 0.4 to 0.25, from its official release notes, upgrade guides and advisories. Sources checked 2026-11-30.
55 breaking51 security1 deprecations136 new APIs and options1 performance74 behavior and defaults3 tooling461 fixes and other
See which of these apply to your code, ranked, in your agent:
npx @unstale/cli initopenai-agents 0.2548 changes
Breaking changes 8
The Daytona extra now requires daytona>=0.226.1,<1.
GPT-6 Chat Completions tool requests now default to non-reasoning.
Native Chat Completions tool requests default to non-reasoning mode when no effort is supplied.
The minimum MCP dependency version is raised for Pydantic and OAuth compatibility.
The MCP dependency requirement is now >=1.30.0,<3,!=2.0.*,!=2.1.*; incompatible dependency pins may need upgrading.
The default model changes from gpt-4.1 to gpt-6-luna; set model="gpt-4.1" to retain the previous choice.
The Runloop sandbox provider has been removed.
The beta Runloop provider, its package extra, and its exports are removed. Runloop users must migrate to another supported provider or remain on 0.24.0.
New APIs and options 6
Use context_deserializer to restore application context from serialized Pydantic context snapshots.
Use context_override to restore application context when resuming from serialized Pydantic context snapshots.
Use context_serializer to exclude or transform process-local fields when serializing Pydantic context snapshots.
Runner handoffs can opt into recovery with failure_error_function; omitting it preserves exception propagation.
Handoff error recovery can now be enabled opt-in.
Utilities are now exposed for third-party session adapters.
Behavior and default changes 6
Agent model settings follow the selected model more closely.
MCP v2 Streamable HTTP supports concurrent requests; MCP v1 retains serialized requests.
Model defaults now align with the TS SDK.
Snapshots now include default values and in-place edits using JSON serialization; process-local fields may require an explicit serializer.
RunState writes checkpoint schema 1.22 to track approvals owned by nested agent tools, while continuing to read schema 1.21.
Session compaction now uses gpt-6-luna by default.
Fixes and other changes 28
Explicit interruption is now honored when automatic VAD is enabled.
Checkpointed assistant text is now restored in Chat Completions.
Wire aliases are now preserved when reading Conversations session history.
ID-less assistant output is now replayed in Chat Completions sessions.
Completed input guardrails are reported when a tripwire fires.
Native tool queues now stop during function failure cleanup.
Nested approval checkpoints can resume with output guardrails.
Nested handoff record boundaries are now preserved.
Completed output guardrails are reported when a tripwire fires.
Pending async calls are now preserved in committed sessions.
Pending input history is now preserved across streamed retries.
Implicit settings now align with provider-selected models.
Pydantic run context snapshots are now preserved.
Failed and incomplete Responses calls now retain provider-reported token usage.
Wire aliases are now preserved when replaying Responses items.
Responses tool choice is fixed for functions named after hosted tools.
Restored handoff history summaries are flattened.
Missing function approval owners are now reported during RunState restore.
Session replay is bounded.
Appending to SQLAlchemy sessions now preserves append order.
Concurrent Streamable HTTP requests are now allowed on MCP v2.
Streamed model attempts are skipped after an input guardrail trips.
Empty structured shell results are now preserved.
Structured tool input is now preserved in agent lifecycle hooks.
The default tool error message no longer includes retry advice.
Tool guardrail results are retained after approval and resume.
Usage is now preserved from failed and incomplete Responses calls.
The dependency constraints now allow websockets 17.
openai-agents 0.2419 changes
Breaking changes 3
macOS sandbox commands deny Launch Services requests, preventing local commands from launching host applications through Launch Services.
Transactional append, clear, and replacement require a supported backend; Redis Cluster reads and pops remain available.
New snapshots use schema 1.21, and some legacy graphs with same-name non-root agents are rejected rather than risk incorrect agent ownership; finish affected tasks with their original SDK and agent code.
Security 1
Protected mount failures produce fresh redacted errors while retaining source arguments and linked exceptions and detaching the caught source traceback.
New APIs and options 2
The formatter arguments include an optional error field for tool exceptions.
The run-wide tool error formatter can receive the new tool_exception category for eligible decorated function failures; explicit per-tool handlers retain precedence.
Behavior and default changes 5
Automatic compaction waits while approvals are pending, avoiding compaction before approval history is ready.
Unserializable dataclass run contexts are omitted with a warning; use a serializer/deserializer or context_override, or strict_context=True to reject omission.
Deferred approval history is persisted across resumes and waits for the output guardrail boundary.
Converted MCP tools expose copied optional mcp_annotations metadata as discovery hints; it does not authorize execution or enter model schemas.
Writes are batched in requests of at most 20 items to respect the API limit; multi-request writes can commit partially, so reconcile remote history before retrying.
Fixes and other changes 8
Approved tools resumed after approval are traced inside the resumed agent span.
Accepted call/output pairs survive sibling or callback failures after input and tool-output guardrails permit publication, allowing supported recovery without replaying completed tools.
Unhandled computer safety checks now produce a warning.
Function-call aliases are preserved when restoring RunState.
Completed stop tools can reject added pending input when ending a resumed run; finish that run before starting a new user turn.
Standalone Redis replacement is atomic; coordinate other writers because atomic replacement does not prevent stale compaction across processes.
The tracing opt-out is honored inside caller-owned traces, including resumed tools and streamed cleanup.
Invalid sandbox tool arguments return recoverable tool errors without swallowing provider failures.
openai-agents 0.2368 changes
Breaking changes 4
Host sources in dictionary sandbox manifests are rejected.
Session history now requires encrypted envelopes.
Tool arguments that would be silently discarded as kwargs are now rejected.
Blank branch names are rejected for SQLite sessions.
Security 8
Streaming callback backlogs are bounded, and callbacks are validated before execution.
Host PATH read grants are limited to the child environment.
Exception details are redacted from Realtime tool error events.
Realtime tool output guardrails are now enforced.
Incoming WebSocket message size is bounded by default.
Grants are enforced during recursive removal.
Model metadata now respects the sensitive trace capture setting.
Special files are rejected in shared UnixLocal file I/O.
New APIs and options 6
An optional item budget is available for compaction rollback.
Docker removal protection can now be opted into.
An encrypted history scan budget is available as an opt-in.
MCP listing page limits are now configurable.
The number of turns used for memory consolidation can now be configured.
Bounded workspace outbox reads are available as an opt-in.
Behavior and default changes 4
Verbose connector output is summarized, reducing the amount of output passed through.
The STT session logging header is no longer forced.
Reasoning is omitted from default trace exports.
gpt-transcribe is now the default voice STT model.
Fixes and other changes 46
Literal Unicode content now matches correctly.
The agent_end event names the agent whose turn ended.
Tools are resolved after agent start hooks run.
Filtered history is preserved during automatic compaction.
Built-in shell and apply_patch tools are selected by their own type.
Premature end-of-file in Chat Completions streams is rejected.
Clearing a session now resets the compaction response chain.
Closed parent constraints are preserved in singleton allOf schemas.
Codex command spans now honor the run tracing policy.
Namespaced compaction model names are accepted.
Output-only metadata is stripped from compaction replay.
Default tool failure details are redacted.
Ambiguous canonical Docker removal paths are rejected.
Encrypted session visibility is refreshed before compaction.
Encrypted SQLite history is preserved when pops use the wrong key.
Exporter overrides are preserved during shutdown.
Annotated constraints on function tools are preserved.
Function tool approvals are scoped to their owning agent.
Agent tools now preserve guarded final outputs.
Host grants are validated against normalized workspace roots.
Resumed MCP calls are bound to their original recipients.
The traceable dictionary now serializes only traced fields.
MongoDB session identifiers are now validated.
Nested agent tool state is isolated across fresh runs and restored against the tool's own agent.
Nullable token counts are normalized in Chat Completions and remaining provider paths.
The pipeline tracing opt-out is honored inside caller traces.
Session keys are validated before clearing.
Terminal controls are escaped in result diagnostics.
Sandbox apply_patch approval scope is checked.
Fresh streamed handoffs are recovered after session append failures, preventing a failed append from losing the handoff.
Handoffs are recovered after compaction is cancelled.
Previous stream event aliases are discarded when a model times out.
The session remains usable after a 5xx response.
Streamed transcription is finished when input ends.
Exception tracebacks from streaming tasks are redacted.
Persistence now preserves structured guardrail diagnostics and agent output.
On Python 3.10, _wait_for_event raises the builtin TimeoutError.
Tool identity is preserved during asynchronous enablement.
Callback results are now validated.
An item with non-JSON-serializable values no longer causes the export batch to be discarded.
Rate-limited trace exports are retried.
Transcription iterators are finished when sessions close during setup.
UnixLocal snapshots preserve hardlinks and normalize special files and symlinks.
Legacy positional configuration arguments continue to be accepted.
Pre-request WebSocket handshake failures are retried.
Nested paths and symlink targets are preserved in workspace snapshots.
openai-agents 0.2256 changes
Breaking changes 8
Chat Completions now reject unpaired function outputs.
Options ignored when an explicit client is provided are now rejected.
Runs cannot resume when accepted terminal output was not persisted.
Empty tool arguments now fail closed instead of being accepted.
Truncated empty completions now raise ModelBehaviorError.
Sandbox apply_patch operations now require update hunks.
Non-streaming Responses with terminal status failed or incomplete now raise ModelBehaviorError.
When an explicit client is provided, conflicting provider options such as organization or project are rejected; applications must set those values on the AsyncOpenAI client.
Security 6
Prevent symlink races in the UnixLocal file API.
MCP tools can now use server-wide guardrails.
STT prompts are redacted from traces.
TTS instructions are redacted from speech spans.
Model-error span recording now respects model-data logging redaction.
Terminal function-tool output rejected by agent output guardrails is redacted from replayable and persisted SDK state.
New APIs and options 6
Support current image generation tool options.
Custom OpenAI TTS voice IDs are supported.
Docker sandbox containers can now be assigned labels.
Customize the messages returned when output guardrails block a response.
Streamed transcription options are now exposed to callers.
Sandbox environments can now configure Unix-local environment isolation.
Behavior and default changes 9
Tool usage tracking now includes shell and apply_patch calls.
Tool output is recorded on approval-gated function spans.
Model providers created by Runner are now closed.
OpenAI provider options now take precedence over default clients.
Voice workflows now support context in the single-agent workflow.
Tool outputs now accept JSON Schema type arrays of object.
Web search tools now support image results.
Agents registered through handoff(agent) are expanded in generated graphs.
Usage accounting is isolated between independent RunState checkpoints while nested-agent aggregation is preserved.
Fixes and other changes 27
delete_branch preserves exact IDs.
Concurrent asynchronous SQLite startup is handled.
Command paths remain POSIX when running on a Windows host.
Conditional approvals are aligned with validated tool arguments.
A missing OPENAI_API_KEY is no longer cached.
Tool-not-found output is delivered when resuming server-managed runs.
The session limit is no longer forwarded as the Conversations page size.
Subprocesses are reaped when a stream closes early.
Reset the compaction response chain after pop.
The usage store is skipped when the branch has no turn.
extra_body is now nested correctly on the any-llm chat path.
The value annotation applies to each keyword value, and keys colliding with named tool parameters are rejected.
Managed MCP servers are deduplicated, and active servers are cleared after cleanup.
In streaming, reaching max_turns no longer overwrites a tripped input guardrail exception.
Cached MCP tools are deep-copied before being returned.
Response IDs are preserved in redacted traces.
Resumed handoffs are recovered after session append failures.
Failed resumed Session writes are recovered before model calls and renewed interruptions.
Tool guardrail results are persisted when a session resumes.
Concurrent writes are preserved during compaction.
Session transformations are preserved during generation tracking.
The working directory is preserved for shell command lists.
Streamed STT forwards language and prompt and honors client configuration.
Every NumPy spelling of a supported TTS dtype is accepted.
Unbounded UnixLocal workspace I/O no longer runs on the event loop.
Variadic tool arguments preserve tuple annotations, reject fixed-length tuple annotations, and retain Field constraints.
Processors are cleaned up after tracing is disabled.
openai-agents 0.2142 changes
Breaking changes 2
Stops handing the tools cache to callers.
Updates OpenAI provider compatibility to
openai>=3.0.0,<4, including HTTPX2-aware request, response, transport, and exception handling.
Security 3
Validates raster content passed to view_image.
Protects manager lifecycle state snapshots and isolates lifecycle results.
Redacts tool output values from output-type validation errors to avoid exposing sensitive output.
New APIs and options 5
Allows Docker sandboxes to disable networking.
Adds resource options for Modal sandboxes.
Adds timeouts for model calls.
Adds sandbox working directories scoped to a run.
Adds a configurable ceiling for retry backoff.
Tooling 3
Adds provider-neutral utilities for deterministic Realtime workflow tests without provider requests.
Adds provider-neutral utilities for deterministic Agent and Sandbox workflow tests without provider requests.
Adds provider-neutral utilities for deterministic Voice workflow tests without provider requests.
Fixes and other changes 29
Normalizes apply_patch paths as POSIX.
Honors exact call approval decisions.
Fixes reasoning replay for Chat Completions.
Includes compaction usage in run totals.
Keeps model paths POSIX-normalized.
Closes all MultiProvider children after failures.
Correctly truncates audio when elapsed time is zero.
Ends iteration after a clean server close.
Counts Responses requests that do not include usage.
Prevents conflicts with advanced SQLite structure tables.
Rejects partially matched stacked anchors.
Gates AnyLLM parallel tool calls on converted tools.
Rejects non-positive audio channel counts.
Rejects non-positive audio frame rates.
Handles non-finite audio rates in Realtime.
Stops buffering audio when audio tracing is disabled.
Handles zero conversation history limits.
Allows managed_secrets to reference existing Runloop secrets.
Corrects max-turn handler session semantics.
Closes the model stream when a streamed turn ends in a terminal failure.
Rejects incomplete multichannel audio frames.
Resumes approvals for recursive agent tool calls.
Aligns parallel tool calls with converted tools.
Preserves resume argument ordering.
Isolates tool decisions in RunState checkpoints.
Interruption snapshots are detached and isolated so changes to snapshots do not affect RunState results.
Exposes the scripted sandbox session type.
Honors extra path grants when using view_image.
Honors WAV sample width.
openai-agents 0.2016 changes
Breaking changes 4
Custom MCP HTTP authentication and client factories must use HTTP types owned by the installed MCP major version, or pin mcp<2.
Applications with customized local MCP HTTP transports can migrate to httpx2 or pin mcp<2; custom authentication and client factories must use HTTP types owned by the installed MCP major version.
Schemas that exceed safe recursion depth are rejected.
Unsafe strict-schema ref siblings are rejected.
Security 3
JSON validation errors are redacted.
Mount validation adds explicit credential-exposure acknowledgements and preserves redacted error contracts without serializing credential authority.
Tool approval is now honored on resume when Runner.run is given a context, and approvals are bound to concrete invocations.
New APIs and options 2
Stages durable user input before a resumed model call, with guardrail, persistence, and serialization support.
Applications can approve unsafe replays.
Behavior and default changes 5
Custom sessions now receive run context.
The implicit default model is now gpt-5.6-luna; explicit models, run-level overrides, and OPENAI_DEFAULT_MODEL still take precedence.
Realtime input transcription supports GA transcription settings for gpt-live-transcribe, gpt-transcribe, and gpt-realtime-whisper.
Local MCP connections support MCP Python SDK v1 and v2 across stdio, SSE, and Streamable HTTP transports.
Raw usage payloads are preserved.
Fixes and other changes 2
The Chat Completions path omits parallel_tool_calls when there are no tools.
TTSModelSettings.speed is now forwarded to the OpenAI speech API.
openai-agents 0.1996 changes
Breaking changes 3
Handoff calls are no longer emitted as streamed tool_called events.
Rejects unsupported streamed speech-to-text audio data types.
Rejects empty additionalProperties mappings in strict schemas.
Security 9
Sandbox token output budgets are enforced.
Default snapshot path resolution is hardened.
Output guardrails are applied to realtime text deltas.
MCP prompt, resource, and cleanup transport errors are redacted, including nested cleanup errors.
URL credentials are redacted from SDK errors, tracing, and tool metadata.
Blaxel unmount paths are redacted in logging.
Streamed models are canceled when input guardrails fail.
Invalid callable approval arguments now fail closed.
Hardens diagnostic logging across runtime components to avoid exposing raw sensitive payloads while preserving useful debugging context.
New APIs and options 7
AnyLLM provider streams are released and completed runs are preserved.
Wrapped callables expose the original callable through wrapped.
Adds a public decorators module for tool and guardrail decorators.
Adds programmatic tool calling, letting supported OpenAI Responses models generate JavaScript to coordinate eligible tools, with streaming, guardrails, approvals, sessions, and RunState integration.
Programmatic tool calling supports per-tool allowed_callers.
Adds a shorter alias for the existing tool decorator.
Adds a Vercel cloud bucket mount strategy; mounted sessions exclude bucket contents from workspace persistence and do not support dynamic mount changes or session resume.
Behavior and default changes 7
AnyLLM Responses reasoning is sent as a mapping.
The max-turns handler output is now persisted to the session.
MCP tool and prompt listings are automatically paginated.
Streamed task spans use the run's own workflow name.
Path grants support native host paths.
Function tools now support async callable objects.
Configuration consistently accepts typed settings objects or dictionaries across agents, runs, models, sessions, sandboxes, and voice pipelines, and validates unknown settings.
Fixes and other changes 70
Empty add_items calls skip conversation creation.
Reused branch IDs are rejected when creating a branch.
Cached sandbox dependency factories use single-flight behavior.
Completed tool guardrail results are preserved.
Sibling work is cancelled after concurrent failures.
Failed realtime connection attempts are cleaned up.
Invalid tool argument errors are redacted.
MongoDBSession enforces its closed state.
Non-stream session saves are deferred until output guardrails.
Non-streaming agent span failures are marked.
Non-streaming content-filter refusals are surfaced.
Repeated history provenance is preserved.
Resolved status is honored before policy checks.
Streamable HTTP retry backoff is derived from backoffs taken.
Streamed provider thinking blocks are preserved.
After-turn cancellation is synchronized with event consumption.
Agent tool name collisions are now resolved consistently.
The move source is removed as the bound user.
Approved tool output is preserved when a streamed run resumes.
Pending thinking blocks are cleared when an assistant message is flushed.
AsyncSQLiteSession now enforces its closed state.
Calling clear_session before initialization no longer creates a remote conversation.
Falsey custom output extractors are honored for agents used as tools.
Delayed audio guardrail interruption is scoped.
Falsey handoff input filters are honored.
Input item order is preserved when duplicates are collapsed.
Interrupt truncation is clamped to the audio received.
Output guardrail results are reported when a tripwire aborts the run.
Model-call failures are recorded on the provider's own span.
An in-flight provider stream can finish closing after cancellation.
Tool name collisions are reconciled when a run resumes.
run_sync replaces a closed default event loop.
A failed SQLiteSession insert is rolled back.
Typeless strict object schemas are normalized.
STT event handling finishes after listener errors.
Thinking blocks are preserved for replay.
Tool calls and outputs retain their order when inputs are deduplicated.
Tool guardrail results are reported for streamed runs.
Committed tool session records are retained when a streamed output guardrail trips.
Trimmed schemas retain the trimmer's definition names and instance data.
Tasks are cleaned up when voice streams close early.
Explicit contracts for zero values are defined.
The audio dispatcher exits its loop when a stream task signals session_ended and blocks while idle.
Sandbox handling preserves tagged EnvValue subclasses.
Modal tar hydration rejects ephemeral paths.
Input guardrail results are reported when a tripwire aborts the run.
Voice iterator cancellation is propagated.
The provider stream is closed on exit, while completed streams are preserved if cleanup fails.
Failed MCP servers are cleaned up before reconnecting.
Realtime handling preserves raw server event payloads.
Redis and Dapr sessions enforce their closed state.
Positive limits count valid items across SQLAlchemy, MongoDB, AdvancedSQLiteSession, Redis, and Dapr sessions.
Tool parameters named like schema keywords are preserved.
Tracing export deadlines use a monotonic clock.
BatchTraceProcessor enforces max_batch_size during force_flush and shutdown.
A zero Blobfuse attribute cache timeout is preserved.
Falsey input builders are honored.
Falsey mapped providers are routed.
The parallel input-guardrail task is canceled when the model turn fails.
Realtime audio format diagnostics are redacted.
Sibling enablement checks are canceled on failure.
Positive limits count valid SQLite session items.
Empty streamed model input is allowed.
Streamed retries are counted when terminal usage is missing.
Improves compatibility with AnyLLM and LiteLLM providers.
Recognizes typed easy input messages in Chat Completions.
When top_logprobs is set, LiteLLM requests now also send logprobs=True.
Pre-response WebSocket server errors are retried.
Preserves session history across model retries.
Voice handling now encodes streamed float32 audio as PCM16.
openai-agents 0.1831 changes
Security 3
Fixes metadata leaks from clear_session.
Fixes metadata leaks from pop_item.
Error details in non-tool traces are redacted.
New APIs and options 4
Task and turn tracing spans are configurable.
Adds support for GPT-5.6 request controls.
Adds hosted multi-agent beta support.
A Unicode storage option was added to SQLAlchemySession.
Performance 1
Accumulates streamed logprobs in place to avoid O(n^2) copies.
Behavior and default changes 3
Realtime sessions now track response usage in session context.
Adds GPT-5.6 model defaults, so developers can use the new defaults.
The default model for RealtimeAgents is now gpt-realtime-2.1.
Fixes and other changes 20
Sandbox setup avoids redundant creation of the E2B workspace root.
Parsing now handles Google docstrings that lack a blank line before a section.
Initialization of OpenAI conversation sessions is serialized.
Prepared-item identity is no longer reused when stale.
Conflicting provider arguments now raise UserError instead of triggering an assertion.
Computer provider instances are isolated across concurrent runs.
Strict JSON schema conversion now bounds $ref expansion.
Streamed session input is preserved across model retries.
Handoffs preserve user messages that contain history wrappers.
Content-filter refusals are surfaced instead of appearing as an empty turn.
Model-backed rollout interruptions are now serialized as dictionaries.
Callback errors are now enqueued synchronously.
Playback timing now uses a monotonic clock.
Browsing helpers now handle list content.
Supports cache-write usage across OpenAI Python versions.
Closes streams when execution exits early.
Sends logprobs=True when top_logprobs is set.
Preserves nested tool state during restoration.
Makes session cleanup deterministic.
Visualization handoff nodes keep their fillcolor by merging style attributes.
openai-agents 0.17101 changes
Breaking changes 3
Relative sandbox workspace roots are rejected.
Using input_type without on_handoff raises UserError.
LocalFile.src and LocalDir.src must stay within the materialization base_dir unless the source path is covered by Manifest.extra_path_grants.
Security 6
Realtime validation failure logs are redacted.
Adds guardrails for tool input before approval.
Applies the hardened HTTP client default to the MCP SSE transport.
Redacts invalid JSON payloads in ModelBehaviorError data.
Mountpoint credentials are kept out of sandbox commands.
Realtime tool approvals are scoped by qualified key.
New APIs and options 6
Adds a recovery handler for invalid final output.
Adds buffered streaming for Chat Completions tool calls.
Websocket max_size limit is configurable, allowing developers to set the limit.
Adds SDK-only custom data for tool outputs, with a strict JSON-compatible contract.
Realtime supports custom voice objects.
Includes the output guardrail count in run error details.
Behavior and default changes 2
Response-feature validation is opt-in; unsupported server state, reusable prompts, custom tool calls, and invalid multi-choice streams are rejected.
RealtimeAgents now default to gpt-realtime-2.
Fixes and other changes 84
Escapes quotes and backslashes in DOT names used for visualization.
Fixes length-frame exec-stdin writes within a sandbox.
Cancellation is now propagated by the realtime session iterator.
Enforces strict Pydantic validation when strict_json_schema=True with handoffs.
Preserves non-dict Mapping values when converting values to dump-compatible form.
Makes add_items atomic, avoiding partial updates.
Reports effective Blaxel timeouts.
Cleans up branch-only messages when deleting branches.
Cancels sibling guardrail tasks when one raises.
Recursively extracts HTTP errors from nested ExceptionGroups.
Validates ls special permission bits by position.
Adds a hint to the error for duplicated MCP server tool names.
Wakes PTY output collection when the process exits in E2B.
Prevents ambiguous tool dispatch among Realtime agents.
Gates remote-mount edit guidance by mode.
Reduces sandbox sink buffering and spool timeouts.
Avoids stale object-id deduplication in the server conversation tracker.
Prevents empty list or tuple tool output from being dropped.
Suppresses warnings about whitespace in handoff tool names.
Sandbox error retryability is now exposed so developers can determine whether an error can be retried.
Tool-end hook results are now typed as object, correcting the hook result type for developers.
Exports additional tracing-related functions and types from agents.
Exports MCPListToolsItem, ToolSearchCallItem, and ToolSearchOutputItem from agents.
Uses a non-None value for output in FunctionSpanData.
Adds opt-in recovery for missing function tools.
Avoids mutating the codex output schema input.
Short chunks from a custom voice splitter are honored.
Leading question marks in exposed port queries are normalized.
Avoids mutating FunctionTool.params_json_schema.
Handles None text when extracting the last content item.
Output schema names for Literal types are corrected.
Import errors for optional memory dependencies are unified.
Exceptions raised by output guardrails are logged instead of silently ignored.
The handoff filter correctly filters hosted_tool_call types.
Handles None text in text_message_output.
Skips wait_for_status when a Vercel sandbox is already in a terminal state.
Makes AsyncSQLiteSession honor session settings.
Avoids producing empty chat tool outputs.
Preserves rejection reasons for local approvals.
Fixes reasoning persistence for OpenAI Conversations.
Interrupts tracing retry backoff when the application shuts down.
Avoids automatically responding to unknown realtime tools.
Parallel tool-call splits no longer duplicate content and signed thinking blocks.
Failed status is preserved across apply_patch operations.
None values for audio.input and audio.output are treated as unset.
Calling to_base64() no longer mutates the caller's buffer.
The worker stays alive when exporters raise errors.
Chained $ref values are preserved during sibling-key expansion.
Computer instances are excluded from provider duck-typing.
The last known response_id is preserved when resuming a conversation.
Generic dict output schemas are aligned.
Git repository subpaths are validated; empty subpaths are allowed as the repository root, and root subpath aliases are preserved.
An assertion failure is replaced with UserError.
remove_all_tools preserves HandoffInputData.input_items.
Parallel tool-call splits no longer duplicate content and signed thinking blocks.
Strict schema conversion is isolated from the non-strict fallback.
MCPToolCancellationError is exported from the top-level package.
Model retry backoff settings are validated.
MongoDB session metadata timestamps are tracked, and corrupt documents are skipped during pop_item.
Skips the checker when status is resolved during approval-run collection.
Nested handoff history content is preserved.
Handoff callables with an async __call__ are awaited.
Required hosted tool IDs are preserved in OpenAI conversation sessions.
Cancelled output guardrail tasks are awaited when a tripwire fires.
Audio content parts are preserved in output_item events.
Output token details are persisted when input details are None.
Realtime event iterators are woken when the session closes.
Realtime output is sent for unknown tool calls.
Existing transcript content is preserved instead of being replaced by a stale delta accumulator.
Invalid input_text parts are skipped when converting user input.
RealtimeAgent fields are validated in __post_init__.
The settings type exposes max_output_tokens.
Reasoning items orphaned by dropped tool calls are removed.
The created_at value is preserved across writes.
RunState guardrail payloads are normalized.
Sandbox archive extraction is limited.
Sandbox provider errors now include their details, making failures more informative.
Corrupt items are skipped during pop instead of disrupting session operations.
Tool guardrail results are preserved across handoffs.
Streaming guardrail exception cleanup is corrected.
String tool trimmer allowlists are handled.
Tracing shutdown is best-effort on process exit.
Existing request_usage_entries are preserved when adding usage.
Fixed an extra_args collision in Responses context management.
openai-agents 0.1614 changes
Breaking changes 3
Rejects function tool input JSON that is not an object.
Hydration now rejects external symlink targets.
The default model changes from gpt-4.1 to gpt-5.4-mini, with implicit GPT-5 defaults including reasoning.effort="none" and verbosity="low".
Security 2
Rejects corrupt Dapr session state updates.
Validates MCP require_approval policies.
New APIs and options 3
Setting max_turns=None disables the Agents SDK run turn limit; omitting it preserves the default of DEFAULT_MAX_TURNS (10).
Setting include_server_in_tool_names to True includes the MCP server name in tool names to prevent conflicts between MCP servers.
RunConfig can configure SDK-side concurrency for local function tool execution, independently of provider-side parallel_tool_calls.
Behavior and default changes 1
Chat completions tool call output indexes are stabilized.
Fixes and other changes 5
Stabilizes indexes in chat completions stream output.
Counts valid encrypted session items when enforcing limits.
Cleans up temporary git repository clones on failure.
Restores session history when compaction replacement fails.
Permissions is now hashable, matching User and Group.
openai-agents 0.1518 changes
Breaking changes 3
MCP rejects non-object tool input JSON.
Rejects string-like shell commands.
Model refusals are surfaced as ModelRefusalError instead of empty text output or retries until MaxTurnsExceeded.
Security 2
Blocks disabled function tools before execution.
Redacts errors in function tool trace spans.
New APIs and options 3
Adds a context management model setting.
Responses WebSocket keepalive options are now exposed, allowing developers to configure keepalive behavior.
A model_refusal run error handler can handle refusals without raising; for structured-output agents, it may return a value matching the output schema.
Fixes and other changes 10
Audio deltas arriving before audio format negotiation are tolerated.
MCP duplicate tool errors are deterministic.
MCP tool input schemas are no longer mutated.
Rejects failed responses stream terminals.
Redacts MCP invalid JSON errors when tool logging is disabled.
Isolates merged MCP tool metadata.
Avoids replaying assistant conversation item IDs.
Filters custom_tool_call types in the remove_all_tools handoff filter.
Rewinds only matching session suffixes.
Makes ToolContext hashable to match RunContextWrapper.
openai-agents 0.1451 changes
Breaking changes 1
Symlinked LocalFile sources are now rejected.
Security 4
Validation of tar and zip members was tightened.
Tracing export payloads are sanitized.
Stops streamed tool execution after a known input guardrail tripwire.
Sensitive MCP tool outputs are redacted more safely when sensitive tracing is disabled.
Deprecations 1
A warning is emitted when characters in a tool name are replaced.
New APIs and options 17
Tool items now expose the convenience property call_id.
Tool items now expose the convenience property tool_name.
Adds an idle timeout option for Modal sandboxes.
Adds BoxMount support.
An extension providing a MongoDB session backend was added.
Sandbox support was added for granting extra filesystem paths.
Can group sandbox memory across multiple turns using a conversation identifier.
Adds a sandbox client for container isolation and image parity.
Adds hosted sandbox clients for Blaxel, Cloudflare, Daytona, E2B, Modal, Runloop, and Vercel through optional extras.
Adds a fresh-workspace contract for specifying files, directories, repositories, environment, users, groups, and mounts.
RunConfig.group_id can group sandbox memory across multiple turns.
Adds memory that stores extracted lessons in the sandbox workspace, summarizes them in later runs, and supports searching deeper rollout summaries.
Adds an Agent with sandbox defaults, capabilities, and run_as support for running agents in persistent, isolated workspaces.
Adds per-run sandbox configuration for clients, sessions, manifest overrides, snapshots, and materialization concurrency limits.
Adds an explicit serialized sandbox session state for resuming work.
Adds a sandbox client for fast local development.
Adds portable snapshots with path normalization, symlink preservation, mount-safe snapshotting, and remote snapshot support.
Behavior and default changes 7
The Phase 2 memory consolidation turn limit was raised.
GPT-5.5 aliases were added to sandbox compaction.
Defaults were updated to GPT-5.5, changing the model used when developers rely on those defaults.
The Daytona workspace root is prepared before the workspace starts.
Run items now persist tool origin metadata.
Adds runner-managed defaults for prompt cache keys.
RunState serialization is sandbox-aware, enabling runner-managed sandbox state serialization and resume behavior.
Fixes and other changes 21
Preserves import errors when re-exporting MCP components, making failures visible to developers.
Delimits sandbox prompt instruction sections.
Unset fields are now removed from calls to the Responses API.
Fixes serving tool outputs when resuming HITL.
Backfills streamed terminal output.
Relative snapshot base overrides are ignored.
Restorability checks for LocalSnapshot are tightened.
Truncation of manifest descriptions is bounded.
Sandbox paths are normalized to fix path handling.
Sandboxes can be imported on Windows.
ChatCompletion responses now handle None choices.
Compacted Responses user inputs are normalized before session reuse.
LiteLLM extra_body forwarding was fixed.
remove_all_tools now handles hosted tool types that were previously missing.
ResponseOutputText content items now tolerate None text.
Sandbox compaction model parsing was loosened.
Run-loop exceptions are surfaced after stream_events completes.
Vercel roots now trust filesystem permissions.
Preserves computer driver compatibility for modifier keys.
Shields server-managed handoffs from unsupported history rewrites.
The runner manages sandbox preparation, capability binding, session lifecycle, state serialization, and resume behavior.
openai-agents 0.1330 changes
Security 2
AnyLLM responses now sanitize replay input before validation.
Private tool metadata is no longer included in persisted session items.
New APIs and options 10
A public flush_traces API is now available.
Chat completions input now accepts raw image_url content parts.
WebSearchTool gains external_web_access.
The extension module adds an any-llm adapter with responses-compatible routing, allowing developers to use any-llm models.
Initialized notification tolerance is now configurable.
MCPServer now exposes list_resource_templates() to list resource templates.
MCPServer now exposes list_resources() to list resources.
MCPServer now exposes read_resource() to read resources.
MCPServerStreamableHttp exposes session_id so streamable HTTP sessions can be resumed across reconnects or stateless workers.
Chat Completions integrations can opt into reasoning-content replay for provider-specific reasoning/tool-call continuity.
Behavior and default changes 3
Local MCP servers now support callable approval policies.
The default reasoning effort is updated for newer models.
The default websocket Realtime model is now gpt-realtime-1.5, so new Realtime agent setups use it without extra configuration.
Fixes and other changes 15
SQLAlchemySession is hardened against transient SQLite locks.
SQLiteSession exports are lazy-loaded.
Recursive trace preview truncation is stopped.
Reasoning extraction now handles iterable vLLM/any-llm Reasoning objects.
SQLite session writes are serialized with shared file locks.
Avoids stale hydrated input IDs in the server conversation tracker.
LiteLLM reasoning_effort is kept portable across providers.
Cancelled single function tools are handled as tool failures.
Follow-up response.create now waits for realtime response.done.
Converted function tools now preserve static MCP metadata.
Compaction strips orphaned assistant message IDs after reasoning removal.
An eager-task race in the function-tool batch executor was avoided.
remove_all_tools() now removes MCP and reasoning item types as well.
Concurrent first writes in SQLAlchemySession are now race-safe.
The run loop now preserves streamed output guardrail tripwires.
openai-agents 0.1215 changes
New APIs and options 4
The SSE/StreamableHttp params now expose auth.
The SSE/StreamableHttp params now expose httpx_client_factory.
Adds a normalized mode for filtered handoff follow-ups.
Opt-in settings for retrying model API calls are available through ModelSettings and can be passed as run config or as model settings per agent.
Fixes and other changes 11
ClosedResourceError is retried on an isolated session.
MCP 408s are retried on an isolated session.
Streamed nested agent output is recovered before the cancellation fallback.
Custom table names are now honored.
Jittered retry delays are capped at max_delay.
Cancelled MCP invocations are normalized into tool errors.
Transient failures are retried on an isolated session.
Inner MCP tool cancellations are handled as tool errors.
Streamable-http MCP requests are serialized per session.
Orphan hosted shell calls are dropped before multi-turn replay.
Explicit approval rejection messages are preserved across resume flows.
openai-agents 0.1111 changes
New APIs and options 1
The Agents SDK supports the Responses API tool search tool, including namespaces.
Behavior and default changes 6
ComputerTool migrates to the GA computer tool; gpt-5.4 can be used with it in addition to computer-use-preview.
Computer preview metadata is optional on GA requests.
Reasoning summaries are finished before text deltas.
RunState schema policy is aligned with release boundaries.
Structured realtime tool outputs are serialized as JSON.
video_url can be handled with litellm and chat completions models.
Fixes and other changes 4
Tracing now shows the GA computer alias.
MCP tool title metadata is preserved across tool call items.
Run-context tool wrappers preserve plain run context.
SQLiteSession now satisfies the Session protocol.
openai-agents 0.1013 changes
Breaking changes 1
Callable MCP policies require approval when the agent is omitted.
Security 1
Oversized tracing span payloads are sanitized.
New APIs and options 7
Explicit prefix modes were added for MultiProvider.
Run results expose immutable metadata for agent tool invocations.
Adds a tool_context accessor for agent tools.
Model request IDs are exposed on raw responses.
Set this option to enable a reusable WebSocket connection for the Responses API.
Use this utility to enable a reusable WebSocket connection for Responses API calls.
Call this function with "websocket" to switch all OpenAI Responses API calls to WebSocket mode; the default behavior is unchanged.
Fixes and other changes 4
McpError is returned as a structured error result instead of crashing the agent run.
Failures from parallel function tools are isolated so one tool’s failure does not affect the others.
Resumed traces are reattached without creating duplicate trace starts.
Realtime model literals in the realtime config were synchronized.
openai-agents 0.918 changes
Breaking changes 2
The return type is narrowed from Tool to FunctionTool; code relying on the broader union type may need adjustments.
Python 3.9 is no longer supported; upgrade to Python 3.10 or newer.
New APIs and options 5
Adds the opt-in value omit to mitigate 400 errors caused by inconsistent item sets when using reasoning models; the default behavior is unchanged.
Function tools accept timeout_behavior, defaulting to error_as_result, with raise_exception also available.
Function tools accept an optional timeout_error_function to customize their behavior.
Function tools accept timeout_seconds to customize their behavior.
ToolOutputTrimmer is added for smart context management.
Behavior and default changes 2
The RunState schema is bumped to 1.1 and has an explicit backward-read policy.
Shell, apply_patch, and computer runtime tools now emit tracing function spans.
Fixes and other changes 9
Strips total_tokens from OpenAI tracing usage payloads.
Reasoning items are filtered from nested handoff input.
Keeps the trace active until voice pipeline processing completes.
Iterable input history is materialized, allowing it to be handled correctly when converted to a new input list.
Nested agent-tool HITL state now persists across RunState JSON round-trips.
Nested agent-tool resume cache is isolated by RunState scope.
Tracing globals are initialized lazily to avoid import-time fork hazards.
StreamedAudioResult now handles odd-length audio buffers.
Trace metadata is now propagated to spans for processors.
openai-agents 0.832 changes
Breaking changes 2
Configure local MCP tool failure handling; the default can return model-visible error output instead of failing the whole run. Set it to None to retain fail-fast semantics.
Synchronous Python callables wrapped as function tools execute on worker threads instead of on the event loop thread.
New APIs and options 13
ShellTool supports a container-based shell runtime with skills, including automatic container selection and skill references.
Realtime agents SDK turn detection supports the model_version parameter.
Function schemas now support Annotated[T, Field(...)], allowing field metadata to be used in function schema definitions.
Adds a maximum-turns capability in REPL.
Makes the codex subprocess stream limit configurable and validates its bounds.
Adds error handlers for runs that reach the maximum turn limit.
MCP servers can return image responses.
Adds support for resolving MCP tool metadata.
Function tools can declare that they require human approval before execution.
Serialize and resume runs after human decisions are made, approving or rejecting pending tool calls.
Adds parameters for customizing sessions.
Adds support for structured agent tool input.
Customize error output from tools.
Behavior and default changes 5
Tool calls now include the agent in ToolContext.
Adds run-context thread reuse for codex_tool.
Adds CRLF support for apply_diff.
Run results surface pending tool approvals as interruptions.
Tool descriptions are propagated to ToolCallItem.
Fixes and other changes 12
Required parameters are validated before call_tool is called.
The default failure handler is resolved at invoke time.
Queued events are emitted before a max-turns exception.
An agent invoked as a tool inherits its parent RunConfig.
RunResultStreaming supports Pydantic model_rebuild.
Null audio formats are omitted from SIP call attach updates.
tool_choice is omitted when a prompt manages built-in tools.
Avoids noisy Pydantic serialization warnings for model_dump items.
Unsupported usage fields are dropped before OpenAI trace ingest.
Preserves handoff target resolution compatibility in run-state agent maps.
Persists streamed run-again tool items to the session.
Fixes MCP tool timeouts that halted agent flow.
openai-agents 0.75 changes
Breaking changes 2
Nested handoffs are disabled by default; set nest_handoff_history to True to enable them.
The default reasoning effort for gpt-5.1 and gpt-5.2 is now none; explicitly set it to low to retain the previous default.
New APIs and options 2
Adds a manager for safely managing the lifecycle of multiple MCP server instances.
Adds custom WebSocket options to OpenAIRealtimeWebSocketModel.
Behavior and default changes 1
When using a sessions store, the callback is optional; by default, new input is appended to the session history.
openai-agents 0.657 changes
Breaking changes 3
Shell tool outputs now enforce max_output_length.
Tool execution exceptions are converted to runtime errors.
Handoff history is now collapsed into a single message when handing off to a new agent; test agents before upgrading to production.
New APIs and options 16
Adds input-based responses compaction with a store-aware auto mode.
Adds an experimental Codex extension that lets agents use Codex as a tool.
Lets an agent use the Codex CLI as a tool when Codex is installed on the host.
Add an aiosqlite-backed asynchronous session store.
Silence LiteLLM serializer warnings in streaming when opted in.
Add responses.compact to automatically compact long conversations.
Agent hooks receive an AgentHookContext with turn_input.
The function_tool decorator accepts tool guardrails.
Gemini 3 Pro is supported.
Tracing API keys can be supplied per run.
Realtime audio mapping is supported.
Exposes failure_error_function in Agent.as_tool so developers can configure failure handling for an agent used as a tool.
Adds on_stream to agents used as tools, allowing developers to handle streaming events from those agents.
Adds a run_in_parallel parameter to input guardrails.
Adds prompt_cache_retention to ModelSettings.
Adds logging for tool errors.
Behavior and default changes 6
Conversations are compatible across models.
Context is attached to apply patch operations.
ModelResponse preserves logprobs from the chat completions API, making them available to developers.
Static tool filtering in MCPServer no longer requires an agent or run_context.
Internal calls can chain previous_response_id on the first turn.
Fixes the default settings for the SIP realtime runner.
Fixes and other changes 32
Handles invalid tool arguments JSON without crashing.
Exception handling was enhanced during MCP server initialization and cleanup.
Fixed missing reasoning_content in DeepSeek tool call messages.
Tool message ordering for Gemini models was fixed.
Vertex AI function calling with no-param tools was fixed.
Defers compaction when local tool outputs are present.
Deduplicates nested handoff inputs.
Improve how OPENAI_AGENTS_DISABLE_TRACING is loaded.
Improve PCM duration calculation.
Fix thinking tokens not being attached when there are no tool calls.
Handle VAD truncation.
Assistant tool-call messages now include explicit content=None.
The chatcmpl converter preserves non-text tool outputs.
The LiteLLM converter preserves non-text tool outputs.
Realtime text mode handles the output_text type.
Streaming no longer blocks cancellation.
Tracing shutdown safety is improved.
Enables creating and disposing a Computer per agent run.
Ensures strict_json_schema is present when using the Chat Completions API.
Improves null handling for input and output token details in the Usage class.
The energy threshold in the realtime CLI demo is fixed.
as_tool no longer returns a blank string when a tool terminates early.
The non-streaming path saves the conversation to the session before handoff.
Callers can send None values to the Realtime API.
reasoning.summary is preserved when passing data to LiteLLM.
A session.add_items exception no longer causes streaming to hang.
Usage from earlier stream chunks is retained when later chunks contain none.
Usage initialization normalizes None token detail objects.
Fixes an invalid model setting when passing a prompt to Agent.
Fixes an agent memory leak using weakref.
A configurable startup delay was added to avoid initial audio jitter with Twilio.
Fixes a Redis SSL connection error with redis-py v7.
openai-agents 0.511 changes
Breaking changes 1
Refusal content parts added by the event now use ResponseOutputRefusal.
New APIs and options 4
Adds support for the GPT-5.1 apply_patch tool.
Adds support for the GPT-5.1 shell tool.
Dapr is now available as a session storage option.
Usage now includes a list of per-request usage data.
Behavior and default changes 2
RealtimeRunner can now handle SIP protocol connections.
Realtime tool start and end events now include tool arguments.
Fixes and other changes 4
Compatibility was improved for openai 2.7.0.
Python 3.14 is now a supported version.
The internal logic of Runner#run_sync was revised for Python 3.14 compatibility.
Usage initialization now normalizes None token details.
openai-agents 0.430 changes
Breaking changes 2
OpenAI package v1.x is no longer supported; use v2.x with this SDK.
Excludes unset fields from the items returned by get_items().
Security 1
Rolls back session changes when a Guardrail tripwire is triggered.
New APIs and options 7
Async tool calling is enabled in Realtime sessions.
Developers can pass a custom reasoning effort for LiteLLM providers.
Adds an engine accessor so a SQLAlchemySession created from a URL can be closed.
Adds image and file output types for functions.
Adds a graceful cancel mode for streaming runs.
Exposes MCP message handler configuration.
Adds httpx_client_factory to MCPServerStreamableHttp initialization options.
Fixes and other changes 20
The LiteLLM model handles an empty choices array.
The stream handler checks for empty reasoning content arrays.
Awaits a cancelled websocket task to prevent a resource leak.
Prevents a race condition when iterating listeners.
Adds the missing MCP approval response event name.
Fixes tuple assignment caused by trailing commas during response cancellation.
Prevents a ValueError when the audio buffer is empty during STT.
Keeps a streaming trace from ending before guardrails complete.
Fixes LiteLLM failures involving the function name for tool_choice when streaming is enabled.
Makes Tool Output dict conversion stricter to improve backward compatibility.
Fixes guardrails behavior when turn_detection.interrupt_response is true.
The filename for input_file is optional in code, supporting non-OpenAI models.
Returns tool output to the LLM.
Fixes multi-turn handling for conversation_id and previous_response_id so only new items are sent.
Adds support for input_audio type items.
Adjusts the realtime handoff import.
Corrects the streaming order of ReasoningItem and RawResponsesStreamEvent events.
Handles the omit type in _remove_not_given() for litellm models.
Fixes an issue where SQLAlchemySession could return items in an invalid order.
Converts oneOf to anyOf in strict schemas for OpenAI compatibility.