Skip to content

Allow codex sandbox to consume MCP sandbox state#29358

Merged
jif-oai merged 4 commits into
mainfrom
jif/sandbox-state-input
Jun 23, 2026
Merged

Allow codex sandbox to consume MCP sandbox state#29358
jif-oai merged 4 commits into
mainfrom
jif/sandbox-state-input

Conversation

@jif-oai

@jif-oai jif-oai commented Jun 21, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • let codex sandbox accept the JSON value from codex/sandbox-state-meta
  • require the payload permissionProfile instead of falling back to ambient permissions
  • reuse the existing macOS, Linux, and Windows launch paths, treating external sandbox state conservatively as read-only
  • let opaque forwarders add runtime read roots and disable direct network access without decoding the payload

Builds on #29113, which is now on main.

Tests

  • just test -p codex-cli debug_sandbox::tests
  • cargo build -p codex-rmcp-client --bin test_stdio_server
  • just test -p codex-core stdio_mcp_tool_call_includes_sandbox_state_meta
  • just test -p codex-mcp
  • just fmt

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: b8cf5d7bd2

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread codex-rs/cli/src/debug_sandbox.rs Outdated
Comment thread codex-rs/cli/src/debug_sandbox.rs Outdated
Comment thread codex-rs/cli/src/debug_sandbox.rs Outdated
@jif-oai jif-oai force-pushed the jif/sandbox-state-input branch from b8cf5d7 to 88e7722 Compare June 21, 2026 19:29
@jif-oai jif-oai requested a review from a team as a code owner June 21, 2026 19:29
@jif-oai jif-oai changed the title Let codex sandbox consume sandbox-state metadata Consume portable sandbox intent in codex sandbox Jun 21, 2026
@jif-oai jif-oai changed the base branch from main to jif/remote-exec-server-sandbox-enforcement June 21, 2026 19:30
@jif-oai jif-oai force-pushed the jif/sandbox-state-input branch 2 times, most recently from 2451657 to 2a60a19 Compare June 21, 2026 20:25
@jif-oai jif-oai changed the title Consume portable sandbox intent in codex sandbox Allow codex sandbox to consume MCP sandbox state Jun 21, 2026

@aaronl-openai aaronl-openai left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thank you!

@jif-oai jif-oai force-pushed the jif/sandbox-state-input branch 2 times, most recently from b6de8dc to 9735c6e Compare June 22, 2026 09:30
Base automatically changed from jif/remote-exec-server-sandbox-enforcement to main June 22, 2026 10:45
@jif-oai jif-oai force-pushed the jif/sandbox-state-input branch from 9735c6e to 6fe4c88 Compare June 22, 2026 10:56
Comment thread codex-rs/cli/src/debug_sandbox.rs Outdated
@jif-oai jif-oai merged commit d248469 into main Jun 23, 2026
36 of 39 checks passed
@jif-oai jif-oai deleted the jif/sandbox-state-input branch June 23, 2026 08:17
@github-actions github-actions Bot locked and limited conversation to collaborators Jun 23, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants