Fix the sandbox examples in the OpenAI Agents README - #1764
Merged
Conversation
The local sandbox client is imported from `agents.extensions.sandbox.unix_local`, which does not exist — `agents.extensions.sandbox.*` holds only the remote backends. `UnixLocalSandboxClient` lives in `agents.sandbox.sandboxes.unix_local`, so the worker example raises ModuleNotFoundError as written. Two other copy-paste breaks in the same examples: - The worker example imports `docker`, which it never uses, and omits the `timedelta` its ModelActivityParameters needs. - The workflow example constructs `DaytonaSandboxClientOptions` without importing it. Also names the module for each options class in the multiple-backends section, since the two live in different packages. Verified against openai-agents 0.20.0: every import line the examples now show resolves, and the constructor calls they make succeed. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
xumaple
approved these changes
Aug 18, 2026
xumaple
approved these changes
Aug 18, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What was changed
The sandbox section of
temporalio/contrib/openai_agents/README.mdimports the local sandbox client fromagents.extensions.sandbox.unix_local, which does not exist.agents.extensions.sandbox.*holds only the remote backends (daytona, e2b, modal, blaxel, cloudflare, runloop, vercel);UnixLocalSandboxClientlives inagents.sandbox.sandboxes.unix_local.Two other copy-paste breaks in the same examples:
docker, which it never uses, and omits thetimedeltaitsModelActivityParametersneeds.DaytonaSandboxClientOptionswithout importing it.The Multiple Backends section now also names the module for each options class, since the two live in different packages.
Why?
The worker example raises
ModuleNotFoundErroras written, so anyone following the sandbox docs has to go find the real import path themselves.Checklist
Closes
How was this tested:
Ran every import line the corrected examples show against
openai-agents0.20.0, plus the constructor calls they make —SandboxClientProvider("local", UnixLocalSandboxClient()),DaytonaSandboxClientOptions(pause_on_exit=False), andUnixLocalSandboxClientOptions(). All resolve. Confirmedagents.extensions.sandbox.unix_localdoes not import, whileagents.extensions.sandbox.daytona(left unchanged) does.Docs-only change; no code paths touched.
🤖 Generated with Claude Code