Skip to content

Use step environments for MCP file uploads - #35878

Merged
copyberry[bot] merged 1 commit into
mainfrom
copyberry/codex-internal-to-codex-oss/935bea18ee425aabeacf4505eaff90565f9751e9
Jul 29, 2026
Merged

copyberry[bot] merged 1 commit into
mainfrom
copyberry/codex-internal-to-codex-oss/935bea18ee425aabeacf4505eaff90565f9751e9

Conversation

@copyberry

@copyberry copyberry Bot commented Jul 29, 2026 •

Copy link
Copy Markdown

Use step environments for MCP file uploads

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.

## 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
@copyberry
copyberry Bot force-pushed the copyberry/codex-internal-to-codex-oss/935bea18ee425aabeacf4505eaff90565f9751e9 branch from 33757b0 to 250de82 Compare July 29, 2026 03:11
@copyberry
copyberry Bot merged commit 250de82 into main Jul 29, 2026
32 checks passed
@copyberry
copyberry Bot deleted the copyberry/codex-internal-to-codex-oss/935bea18ee425aabeacf4505eaff90565f9751e9 branch July 29, 2026 03:12
@github-actions github-actions Bot locked and limited conversation to collaborators Jul 29, 2026

This branch was previously deployed

1 inactive deployment
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.

6 participants