Apply sandbox intent inside remote exec servers#29113
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 36f562b950
ℹ️ 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".
36f562b to
e6169bc
Compare
|
@codex review |
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: e9c548f317
ℹ️ 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".
Why
PR #29108 lets the orchestrator send sandbox intent with
process/startwithout wrapping the command for its own operating system.This PR completes that boundary by making the executor interpret and enforce the intent using its own filesystem paths and sandbox implementation.
For example, a macOS TUI targeting a Linux devbox sends
/bin/bash -lc pwd. The Linux executor turns that into its owncodex-linux-sandbox ... /bin/bash -lc pwdlaunch.What changes
process/startunchanged when no sandbox intent is present.PathUrivalues into native paths on the executor.:workspace_rootspermissions to the executor's native sandbox cwd.codex-linux-sandbox.The boundary is therefore:
This PR intentionally treats a denied remote command as an ordinary command failure. Draft follow-up #29424 carries a semantic
sandboxDeniedresult back to unified exec for the existing approval and retry flow.Platform scope
Linux and macOS use their existing direct-spawn sandbox transforms.
Windows sandboxed remote process launch is intentionally unsupported in this PR. The current Windows direct-spawn wrapper does not correctly preserve arbitrary argv, TTY behavior, or pass the full child environment out of band. The executor rejects the request instead of running it incorrectly or unsandboxed.
Known follow-ups
TODO(jif)marks where the executor boundary should receive pre-host-materialization permission intent.arg0. ATODO(jif)marks where this must be preserved or rejected explicitly.Rollout assumption
This executor-sandbox stack is unreleased and its client and executor are expected to move together. This PR does not add mixed-version negotiation with older exec servers.