mirror of
https://github.com/openai/codex.git
synced 2026-11-13 14:46:14 +00:00
Use step environments for MCP file uploads (#35878)
## Why An MCP tool call can run after its selected environment becomes ready, while the turn context still contains the earlier starting-state snapshot. File argument rewriting must use the environment available to the current step so it can resolve and upload local files in that case. ## What changed - Pass `StepContext` through MCP file argument rewriting. - Resolve the primary environment from the step snapshot while retaining turn-scoped configuration and metadata. - Add coverage for an environment that transitions from starting to ready during a turn. GitOrigin-RevId: 935bea18ee425aabeacf4505eaff90565f9751e9
This commit is contained in:
1 parent
6c13b113a3
commit
250de82bfb
3 files changed
+50
-17
No files matched your search
@@ -428,7 +428,7 @@ async fn handle_approved_mcp_tool_call(
|
||||
.await;
|
||||
let rewritten_arguments = rewrite_mcp_tool_arguments_for_openai_files(
|
||||
sess,
|
||||
turn_context,
|
||||
step_context,
|
||||
arguments_value,
|
||||
metadata.openai_file_input_optional_fields.as_ref(),
|
||||
)
|
||||
|
||||
Reference in new issue
Block a user