Skip to content

fix: reject relative sandbox workspace roots#3422

Merged
seratch merged 1 commit into
openai:mainfrom
matthewflint:mflint/sandbox-absolute-workspace-root
May 16, 2026
Merged

fix: reject relative sandbox workspace roots#3422
seratch merged 1 commit into
openai:mainfrom
matthewflint:mflint/sandbox-absolute-workspace-root

Conversation

@matthewflint
Copy link
Copy Markdown
Contributor

Summary

  • Reject relative sandbox workspace roots when constructing WorkspacePathPolicy.
  • Add a regression test that prevents returning relative sandbox paths from a relative root.

Why

WorkspacePathPolicy methods are documented and used as absolute sandbox path helpers. With root="workspace", normalize_path("file.py") can produce workspace/file.py instead of an absolute sandbox path, weakening the invariant that sandbox paths are rooted under an absolute workspace.

Testing

  • uv run pytest tests/sandbox/test_workspace_paths.py
  • uv run ruff check src/agents/sandbox tests/sandbox
  • uv run pyright

Validate sandbox workspace roots during WorkspacePathPolicy setup so relative roots are rejected before manifest paths are resolved against an ambiguous base.
@matthewflint matthewflint force-pushed the mflint/sandbox-absolute-workspace-root branch from a569204 to 9fa6c96 Compare May 15, 2026 11:48
@seratch seratch added this to the 0.17.x milestone May 16, 2026
@seratch seratch merged commit 94523f9 into openai:main May 16, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants