Skip to content

Resolve MCP file uploads with environment-native paths - #36002

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

Resolve MCP file uploads with environment-native paths#36002
copyberry[bot] merged 1 commit into
mainfrom
copyberry/codex-internal-to-codex-oss/0a659c19e73f5a26ddfc864e39dad6a4a404057b

Conversation

@copyberry

@copyberry copyberry Bot commented Jul 29, 2026

Copy link
Copy Markdown

Resolve MCP file uploads with environment-native paths

Why

File arguments for MCP app tools can use a path convention that differs from
the host running Codex. Resolving those arguments with host-native path handling
can therefore point uploads at the wrong file.

What changed

  • Resolve file arguments against the selected turn environment's working
    directory with PathUri::join.
  • Use the resolved URI's inferred native spelling for errors and derive the
    uploaded filename without converting through a host-native path.

Testing

Run the existing MCP file upload integration test under Wine and reduce its
streaming fixture to 2 MiB.

## Why

File arguments for MCP app tools can use a path convention that differs from
the host running Codex. Resolving those arguments with host-native path handling
can therefore point uploads at the wrong file.

## What changed

- Resolve file arguments against the selected turn environment's working
  directory with `PathUri::join`.
- Use the resolved URI's inferred native spelling for errors and derive the
  uploaded filename without converting through a host-native path.

## Testing

Run the existing MCP file upload integration test under Wine and reduce its
streaming fixture to 2 MiB.

GitOrigin-RevId: 0a659c19e73f5a26ddfc864e39dad6a4a404057b
@copyberry
copyberry Bot force-pushed the copyberry/codex-internal-to-codex-oss/0a659c19e73f5a26ddfc864e39dad6a4a404057b branch from b51ba64 to 7579a2b Compare July 29, 2026 18:07
@copyberry
copyberry Bot merged commit 7579a2b into main Jul 29, 2026
30 of 32 checks passed
@copyberry
copyberry Bot deleted the copyberry/codex-internal-to-codex-oss/0a659c19e73f5a26ddfc864e39dad6a4a404057b branch July 29, 2026 18:08
@github-actions github-actions Bot locked and limited conversation to collaborators Jul 29, 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.

4 participants