OpenAI Python SDK 3.42: Beta Agents Get Compaction, Auto Review and Time Awareness Settings, Read From the Types
OpenAI's Python SDK v3.42.0 added settings to beta agents and sessions for background or blocking compaction, automatic action review and experimental time awareness. I read the release notes, commit messages and the generated type definitions to list what each setting says.
OpenAI's Python SDK v3.42.0, released on October 31, 2026, adds three settings to the beta agents and sessions surface: context compaction (background or blocking), session review (none or auto_review), and an experimental time_awareness flag. The release notes are one line each. The generated type definitions in the repository carry the actual field documentation, so I read those. This is a reading of the SDK source, not a test against the API.
I read the v3.42.0 and v3.42.1 release notes, the commit messages for the three features, and the type files for Agent, AgentSession, the session create and update params, and the automation target params at tag v3.42.1. I did not call the API or read OpenAI's own API reference. An earlier article on this site covers the Agents API beta's sandbox options, keys and data limits, and this one covers only the new settings.
What the release notes say
v3.42.0 lists, among other changes (SIP DTMF commands, image edit markup overlays, organization external key management, WebSocket recovery and several others):
- "add agent context compaction settings" (#4209)
- "add agent session review and tool settings" (#4217)
- "add experimental agent time awareness" (#4211)
v3.42.1 (November 1) lists only bug fixes and a refactor around Responses WebSocket behavior and Realtime authentication profiles.
Compaction
The commit message for #4209 says it "adds context compaction settings to beta agents, sessions, and scheduled agent runs". You configure background or blocking compaction with an async_ parameter (the wire name is async), and you can read the effective settings from agents, sessions and scheduled agent configurations.
From the types:
- The effective setting is a
compactionobject with a booleanasync: "Whether context is compacted in the background. Defaults to true." - On create or update, omission or null defaults to true, and setting it to false selects blocking compaction.
- "A supplied object replaces the settings; null or an empty object enables background compaction." Omitting the whole object keeps the current settings.
What the types do not say is what compaction does to the context, how a summary is built or how much it costs. I did not find that in the files I read.
Session review
The commit message for #4217 says it "adds session review options and tool replacement". The type docs define review as a literal of none or auto_review:
none: keep the existing execution behavior without automatic action review.auto_review: review eligible actions automatically, and deny manual approval fallbacks.- On session create, omitting it means
none. - On session update, it is the default action review for new root turns. Existing turns and their subagents keep their review mode.
- On the session object,
reviewis omitted when it isnoneand automatic review is not enabled.
The "deny manual approval fallbacks" wording is the part to read closely. As written, an action that automatic review does not approve is not routed to a person for manual approval. I would confirm that with a test before relying on it, because the type docs do not say what happens to a denied action. Which actions count as "eligible" is also not defined in the files I read.
Tool replacement on a session
The same commit adds replacing session tools through agent.tools on a session update. The type docs say it "replaces the session tools": functions and MCP servers change on the next model call, built-in tools change by the next turn, and omitting the field keeps the current tools while null or an empty array clears them. Because a supplied list replaces the whole set, an update that lists one tool leaves the session with only that tool.
Time awareness
The commit message for #4211 says it adds optional time-awareness settings for agents and sessions. The field is experimental.time_awareness, a boolean. The read-side doc says "Whether the model receives periodic current-time reminders", and the write-side doc says "Omit to keep the current setting". The commit also documents that experimental updates "merge by key and preserve omitted settings". The word experimental is in the field name, so I would expect this to change. The types do not say how often the reminders arrive.
What I would check
These are my untested suggestions.
1. Create a session with review set to auto_review and trigger an action that needs approval, then see what the session reports for a denied action.
2. Turn compaction to blocking on a long test session and compare latency with the default background mode.
3. Update session tools with a one-item list and confirm the others are gone.
4. Pin the SDK version, since these are beta, generated types and time_awareness is experimental.
5. Read OpenAI's API reference for the same fields, because I only read the SDK.
What I would not conclude
- That
auto_reviewis a safety guarantee. The type docs describe a mode, not its coverage or accuracy. - That compaction is lossless. The files do not describe it.
- That these settings are stable. The surface is under
betaand one setting is labeled experimental. - That the SDK and the API behave identically. I did not call the API.
Frequently asked questions
What did Python SDK 3.42.0 add for agents?
Context compaction settings, session review and tool settings, and experimental time awareness, per the release notes.
What is the default for compaction?
Background compaction. The type docs say async defaults to true when omitted or null.
What does auto_review do?
It reviews eligible actions automatically and denies manual approval fallbacks, per the type docs. I did not test it.
Can I change review mid-session?
On update it sets the default for new root turns. Existing turns and their subagents keep their review mode.
What does time_awareness do?
It controls whether the model receives periodic current-time reminders. It is under experimental.
What happens when I update session tools?
The supplied list replaces the session tools. Omit it to keep them, or pass null or an empty array to clear them.
Did you run any of this?
No. I read release notes, commits and type definitions.
Sources
All read on November 2, 2026.
- openai-python releases (v3.42.0, v3.42.1)
- Commits f552fcf, a63c4cd and 10f9dd0
- Type definitions at tag v3.42.1: agent.py, agent_session.py, session_update_params.py and session_create_params.py
Not read: OpenAI's API reference and docs for these fields, the OpenAPI spec, and the SDK's other v3.42.0 changes beyond their titles.
Related reading
- OpenAI Agents API Beta: Three Sandbox Options and Where Your Keys, Files and Data End Up
OpenAI's Agents API runs a managed Codex agent in sessions. What the help center, Databricks cookbook and Cloudflare docs say about sandbox choices, key scopes, billing and data limits, and what they leave open.
- Codex CLI 0.165.0 Release Notes: Vertex AI Provider, Memory v2 Default, Reasoning Effort Switching
What the Codex CLI 0.165.0 release notes say changed: a built-in Google Cloud Vertex AI provider, memory v2 on by default for fresh profiles, mid-conversation reasoning effort changes, and a marketplace URL fix. What to check before you upgrade.
- OpenAI's Decisions API Is Generally Available: Typed Answers, $0.10 per Million Input Tokens and What to Test
OpenAI says the Decisions API is generally available, built on GPT-6 Luna, up to 10x faster than the Responses API for bounded questions, with no output-token charges. What the launch post and docs say, and how to test it for routing and classification.
The build log
Follow the work.
New essays and prototypes, in your feed reader. Email subscriptions are paused while I connect a working delivery service. No email is collected here.
Follow via RSS