Skip to content

Fix the sandbox examples in the OpenAI Agents README - #1764

Merged
brianstrauch merged 2 commits into
mainfrom
fix/sandbox-readme-imports
Aug 18, 2026
Merged

Fix the sandbox examples in the OpenAI Agents README#1764
brianstrauch merged 2 commits into
mainfrom
fix/sandbox-readme-imports

Conversation

@brianstrauch

Copy link
Copy Markdown
Member

What was changed

The sandbox section of temporalio/contrib/openai_agents/README.md imports the local sandbox client from agents.extensions.sandbox.unix_local, which does not exist. agents.extensions.sandbox.* holds only the remote backends (daytona, e2b, modal, blaxel, cloudflare, runloop, vercel); UnixLocalSandboxClient lives in agents.sandbox.sandboxes.unix_local.

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.

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 ModuleNotFoundError as written, so anyone following the sandbox docs has to go find the real import path themselves.

Checklist

  1. Closes

  2. How was this tested:

Ran every import line the corrected examples show against openai-agents 0.20.0, plus the constructor calls they make — SandboxClientProvider("local", UnixLocalSandboxClient()), DaytonaSandboxClientOptions(pause_on_exit=False), and UnixLocalSandboxClientOptions(). All resolve. Confirmed agents.extensions.sandbox.unix_local does not import, while agents.extensions.sandbox.daytona (left unchanged) does.

Docs-only change; no code paths touched.

🤖 Generated with Claude Code

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>
@brianstrauch
brianstrauch requested review from a team as code owners August 18, 2026 20:40
Comment thread temporalio/contrib/openai_agents/README.md Outdated
@brianstrauch
brianstrauch enabled auto-merge (squash) August 18, 2026 21:37
@brianstrauch
brianstrauch merged commit ac136dc into main Aug 18, 2026
18 checks passed
@brianstrauch
brianstrauch deleted the fix/sandbox-readme-imports branch August 18, 2026 21:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants