[codex] Route MCP file uploads through environment filesystem#27923
Conversation
a01923b to
fe2a373
Compare
e6cf84e to
263a7db
Compare
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 0ecbff24e7
ℹ️ About Codex in GitHub
Codex has been enabled to automatically 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 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
|
@codex review |
|
Codex Review: Didn't find any major issues. Nice work! Reviewed commit: ℹ️ About Codex in GitHubCodex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback". |
jif-oai
left a comment
There was a problem hiding this comment.
Pre-approved after my comments
| resolved_path.display() | ||
| )) | ||
| })?; | ||
| let sandbox = turn_context.file_system_sandbox_context( |
There was a problem hiding this comment.
(found by Codex)
This drops approved request_permissions grants: a user can grant turn/session read access to this file, but we still build the sandbox with None, so the metadata/read are denied
53875b6 to
fac2ffd
Compare
Why
Codex Apps tools can mark arguments with
openai/fileParams, but the execution path resolved and opened those files directly on the host. That bypassed the selected turn environment and prevented annotated file arguments from working with remote environments.What changed
ExecutorFileSystemThis builds on #27927, which added
sizeto internal filesystem metadata.Testing
just test -p codex-api upload_openai_file_returns_canonical_urijust test -p codex-mcp tool_with_model_visible_input_schema_masks_file_paramsjust test -p codex-core mcp_openai_filejust test -p codex-core codex_apps_file_params_upload_environment_files_before_mcp_tool_call