65 Commits

Author SHA1 Message Date
Kazuhiro Sera ed644fc7c3 fix(core): redact blocked tool outputs from replay state (#4507) 2026-08-19 15:39:24 +09:00
Kazuhiro Sera 05d6850da5 feat: add scripted model test utilities (#4362) 2026-08-13 11:20:33 +09:00
Kazuhiro Sera 443e1f5113 fix: prune orphaned tool outputs from limited sessions (#4324) 2026-08-09 12:44:16 +00:00
Kazuhiro Sera 6115461c6b feat(retry): allow applications to approve unsafe replays (#4319)
Co-authored-by: LeSingh1 <sshaurya914@gmail.com>
2026-08-09 16:27:33 +09:00
Kazuhiro Sera 98c363743a Fix falsy optional reference handling (#4305) 2026-08-08 17:55:23 +09:00
Henry Su fb3a2482ea fix(sessions): strip placeholder item IDs before Conversations persistence (#4288) 2026-08-07 22:11:55 +00:00
Kazuhiro Sera 4720150fde fix: bind tool approvals to concrete invocations (#4257) 2026-08-07 11:59:01 +00:00
Shaurya Singh a3f2bb8eea fix(sessions): apply the reasoning item id policy to stored session history (#4278) 2026-08-07 10:11:35 +00:00
Kazuhiro Sera 8b810bc4bd fix: scope hosted MCP approvals to server identity (#4256) 2026-08-07 02:29:37 +00:00
Kazuhiro Sera 69e26269f5 fix: defer non-stream session saves until output guardrails (#4184)
Co-authored-by: Henry Su <henrysu4707@gmail.com>
2026-08-05 09:46:02 +09:00
Kazuhiro Sera 154e44146d fix(memory): preserve repeated history provenance (#4181)
Co-authored-by: Henry Su <henrysu4707@gmail.com>
2026-08-05 00:26:54 +00:00
Omid Saffari 052f8387a6 fix(run): honor falsey handoff input filters (#4153) 2026-08-03 22:23:59 +00:00
Kazuhiro Sera c546ca1209 fix: preserve tool call and output order when deduplicating inputs (#4147) 2026-08-03 10:25:46 +00:00
Henry Su bdc294fcd4 fix(run): keep input item order when collapsing duplicates (#4140) 2026-08-03 06:23:54 +00:00
Kazuhiro Sera 9f4292e5d8 fix: resolve agent tool name collisions consistently (#4137) 2026-08-03 04:54:49 +00:00
Kazuhiro Sera 59763339cb fix: harden sensitive runtime logging (#3938) 2026-07-24 15:36:48 +00:00
Kazuhiro Sera 4c251ff779 fix: improve provider compatibility and preserve session history on retries (#3931) 2026-07-24 01:09:59 +00:00
Kazuhiro Sera 15bac19550 fix(handoffs): partition nested history ownership (#3823) 2026-07-18 07:18:57 +09:00
DongBo 585053b8bf fix(computer): isolate provider instances across concurrent runs (#3843) 2026-07-16 07:23:38 +09:00
Kazuhiro Sera a4ba63f704 feat: add pre-approval tool input guardrails (#3487) 2026-06-18 12:38:15 +09:00
Kazuhiro Sera 45effb4b7d fix: #3459 add opt-in recovery for missing function tools (#3461) 2026-05-21 10:46:44 +09:00
Kazuhiro Sera 5635fab9d3 fix: #3268 fix OpenAI Conversations reasoning persistence (#3352) 2026-05-12 07:20:47 +09:00
Kazuhiro Sera 601ecf5503 fix: #3123 avoid replaying assistant conversation item IDs for OpenAIConversationsSession (#3127) 2026-05-05 20:55:29 +09:00
c 3854c124cb fix: only rewind matching session suffixes (#3090) 2026-05-04 10:05:37 +09:00
Kazuhiro Sera 83b3833382 fix #2151 shield server-managed handoffs from unsupported history rewrites (#2747) 2026-04-16 03:17:00 +09:00
Steve Coffey 2d665c9a67 Sandbox Agents (#2889)
### Sandbox Agents

This release adds **Sandbox Agents**, a beta SDK surface for running
agents with a persistent, isolated workspace. Sandbox agents keep the
normal `Agent` and `Runner` flow, but add workspace manifests,
sandbox-native capabilities, sandbox clients, snapshots, and resume
support so agents can work over real files, run commands, edit
repositories, generate artifacts, and continue work across runs.

Key pieces:

- `SandboxAgent`: an `Agent` with sandbox defaults such as
`default_manifest`, sandbox instructions, capabilities, and `run_as`.
- `Manifest`: a fresh-workspace contract for files, directories, local
files, local directories, Git repos, environment, users, groups, and
mounts.
- `SandboxRunConfig`: per-run sandbox wiring for client creation, live
session injection, serialized session resume, manifest overrides,
snapshots, and materialization concurrency limits.
- Built-in capabilities for shell access, filesystem editing and image
inspection, skills, memory, and compaction.
- Workspace snapshots and serialized sandbox session state for
reconnecting to existing work or seeding a fresh sandbox from saved
contents.

### Sandbox clients and hosted providers

Sandbox agents now support local, containerized, and hosted execution
backends:

- `UnixLocalSandboxClient` for fast local development.
- `DockerSandboxClient` for container isolation and image parity.
- Hosted sandbox clients for Blaxel, Cloudflare, Daytona, E2B, Modal,
Runloop, and Vercel through optional extras.

The release also adds provider-specific examples and mount strategies
for common storage backends, including S3, Cloudflare R2, Google Cloud
Storage, Azure Blob Storage, and S3 Files where supported by the
selected backend.

### Sandbox memory

Adds a sandbox memory capability that lets future sandbox-agent runs
learn from prior runs. Memory stores extracted lessons in the sandbox
workspace, injects a concise summary into later runs, and uses
progressive disclosure so agents can search deeper rollout summaries
only when useful.

Memory supports:

- Read-only or generate-only modes.
- Live updates when the agent discovers stale memory.
- Multi-turn grouping through `conversation_id`, SDK `Session`,
`RunConfig.group_id`, or generated run IDs.
- Separate memory layouts for isolating memory across agents or
workflows.
- S3-backed examples for persisted memory across runs.

### Workspace mounts, snapshots, and resume

This release adds a full workspace entry and mount model for sandbox
sessions:

- Local files and directories.
- Synthetic files and directories.
- Git repository entries.
- Remote storage mounts for S3, R2, GCS, Azure Blob Storage, and S3
Files.
- Provider-specific mount strategies across Docker, Modal, Cloudflare,
Blaxel, Daytona, E2B, and Runloop.
- Portable snapshots with path normalization, symlink preservation,
mount-safe snapshotting, and remote snapshot support.
- Resume paths through runner-managed `RunState`, explicit
`SandboxSessionState`, or saved snapshots.

### Examples and tutorials

Adds a large `examples/sandbox/` suite covering:

- Local Unix and Docker sandbox runners.
- Docker mount smoke tests for S3, GCS, Azure Blob Storage, and S3
Files.
- Sandbox coding tasks with skills.
- Sandbox agents as tools and handoff patterns.
- Memory examples, including multi-agent/multi-turn memory and S3-backed
memory.
- Tax-prep and healthcare-support workflows.
- Dataroom QA and metric extraction tutorials.
- Repository code review tutorial.
- Vision website clone tutorial.
- Provider examples for Blaxel, Cloudflare, Daytona, E2B, Modal,
Runloop, Temporal, and Vercel.

### Runtime, tracing, and model plumbing

The release includes the runtime plumbing needed to make sandbox agents
work naturally inside the existing SDK:

- Runner-managed sandbox preparation, capability binding, session
lifecycle, state serialization, and resume behavior.
- Sandbox-aware `RunState` serialization.
- Unified sandbox tracing with SDK spans.
- Token usage on tracing spans.
- Runner-managed prompt cache key defaults.
- OpenAI agent registration and harness ID configuration.
- Safer redaction of sensitive MCP tool outputs when sensitive tracing
is disabled.
- Additional OpenAI client/model utilities and Chat Completions
coverage.


## Documentation & Other Changes

- docs: add Asqav to external tracing processors list.
- docs: update translated document pages.

Co-authored-by: Abdulrahman Alfozan <alfozan@openai.com>
Co-authored-by: Aditya Singh <60082699+adityasingh2400@users.noreply.github.com>
Co-authored-by: Andi Liu <andi@openai.com>
Co-authored-by: Aron <263346377+aron-cf@users.noreply.github.com>
Co-authored-by: ashwinnathan-openai <ashwinnathan@openai.com>
Co-authored-by: Codex <noreply@openai.com>
Co-authored-by: cploujoux <cploujoux@blaxel.ai>
Co-authored-by: elainegan-openai <168589666+elainegan-openai@users.noreply.github.com>
Co-authored-by: Elias Freider <freider@users.noreply.github.com>
Co-authored-by: Erik Dunteman <erik@erikds-macbook-air.local>
Co-authored-by: Jason Liu <jasonliu@openai.com>
Co-authored-by: Jason Steving <32336750+jasonsteving99@users.noreply.github.com>
Co-authored-by: Kazuhiro Sera <seratch@openai.com>
Co-authored-by: Lovre Pešut <lovre.pesut@gmail.com>
Co-authored-by: Lucas Wang <lucas_wang@lucas-futures.com>
Co-authored-by: Matt Brockman <matt.brockman@e2b.dev>
Co-authored-by: Mish Ushakov <mishushakov@users.noreply.github.com>
Co-authored-by: Naresh <ghostwriternr@gmail.com>
Co-authored-by: nicholasclark-openai <nicholasclark@openai.com>
Co-authored-by: qiyaoq-oai <qiyaoq@openai.com>
Co-authored-by: Scott Trinh <scott@scotttrinh.com>
Co-authored-by: tode-rl <tony@runloop.ai>
Co-authored-by: Wendy Jiao <wendyjiao@openai.com>
2026-04-15 10:00:40 -07:00
Kazuhiro Sera c2f6690ff2 fix: #2776 keep private tool metadata out of persisted session items (#2781) 2026-03-26 20:09:37 +09:00
elainegan-openai 687e974046 fix: handle cancelled single function tools as tool failures (#2762) 2026-03-25 14:17:20 +09:00
Kazuhiro Sera e88bcf2e2b fix: #2258 add normalized to_input_list mode for filtered handoff follow-ups (#2667) 2026-03-14 10:03:51 +09:00
Kazuhiro Sera 9073d5c3f4 fix: #2664 drop orphan hosted shell calls before multi-turn replay (#2665) 2026-03-14 00:56:41 +09:00
Kazuhiro Sera 1959dd3ba9 feat: #2658 preserve explicit approval rejection messages across resume flows (#2660) 2026-03-13 14:23:32 +09:00
Kazuhiro Sera 3a5267340a feat: add opt-in model retry policies (#2651) 2026-03-12 12:32:54 +09:00
Kazuhiro Sera fc6afebc48 test: improve coverage for tracing and runtime helpers (#2635) 2026-03-08 02:22:05 +00:00
Kazuhiro Sera 4f40c01e35 fix: #2624 migrate ComputerTool to the GA computer tool (#2626) 2026-03-08 08:33:05 +09:00
Kazuhiro Sera 9ac31ab49f feat: add Responses API tool search support (#2610) 2026-03-06 19:23:38 +09:00
Kazuhiro Sera 933a3a93d7 fix: isolate parallel function tool failures (#2584) 2026-03-04 05:37:10 +09:00
Kazuhiro Sera 74e8c1e22d fix: persist reasoning item ID policy across resumes and streamed follow-up turns (#2512) 2026-02-19 13:33:50 +09:00
Kazuhiro Sera 6375b974c6 fix: #2503 filter reasoning items from nested handoff input (#2508) 2026-02-18 07:45:49 +09:00
Kazuhiro Sera 069f126490 feat: #2346 add configurable timeout handling for function tools (#2479) 2026-02-13 14:02:09 -08:00
weiguang li a86b8acbd0 fix(core): #772 avoid noisy pydantic serialization warnings for model_dump items (#2443) 2026-02-09 14:23:27 -08:00
Rohan Mehta d2e9c9328b Include agent in ToolContext tool calls (#2446)
Summary
- propagate the current `Agent` into every new `ToolContext`, including
realtime session and tool execution paths
- extend `ToolContext` to accept an `agent` keyword, preserve
backwards-compatible constructors, and add regression/unit coverage for
the new behavior
Testing
- Not run (not requested)
2026-02-09 11:00:43 -05:00
Rohan Mehta a53d6bd80d Revert "Add agent to ToolContext calls"
This reverts commit 7722970661.
2026-02-09 10:52:31 -05:00
Rohan Mehta 7722970661 Add agent to ToolContext calls 2026-02-08 12:28:22 -05:00
Kazuhiro Sera a750053576 fix: preserve latest session tool outputs and keep orphan calls in non-resume input prep (#2411) 2026-02-04 18:41:26 +09:00
Kazuhiro Sera 6491c63d72 fix: preserve legacy positional previous_response_id in Runner.run_streamed (#2408) 2026-02-04 08:06:40 +09:00
Kazuhiro Sera a9485c800f fix: resolve a migration error in #2230 (#2404) 2026-02-03 22:01:46 +09:00
Kazuhiro Sera d6c4390134 feat: add tool_error_formatter for customizing error tool output (#2400) 2026-02-03 21:06:37 +09:00
Kazuhiro Sera 3ce7c24d34 feat: #636 Add human-in-the-loop (HITL) support (#2230)
Co-authored-by: Michael James Schock <m@mjschock.com>
2026-01-29 12:16:28 +09:00
Kazuhiro Sera 6ab83d4382 fix: #2211 Move nested handoffs to opt-in feature (#2272) 2026-01-20 12:08:56 +09:00
Kazuhiro Sera bf2625cfed fix: #2171 dedupe nested handoff inputs (#2323)
Co-authored-by: Ankan Misra <misra13arko@gmail.com>
2026-01-16 20:24:13 +09:00