Skip to content

Preserve Windows environment variables for remote MCP servers - #50129

Merged
copyberry[bot] merged 1 commit into
mainfrom
copyberry/codex-internal-to-codex-oss/059c9e23833be66aaf5b65ba5f95013f94f0f792
Oct 2, 2026
Merged

copyberry[bot] merged 1 commit into
mainfrom
copyberry/codex-internal-to-codex-oss/059c9e23833be66aaf5b65ba5f95013f94f0f792

Conversation

@copyberry

@copyberry copyberry Bot commented Oct 2, 2026 •

Copy link
Copy Markdown

Preserve Windows environment variables for remote MCP servers

Why

When Codex runs on Unix and launches a stdio MCP server on a Windows executor, explicit remote environment variables activate an allowlist based on Unix defaults. This can filter out Windows runtime and temporary-directory variables.

What changed

Include SYSTEMROOT, TEMP, and TMP in the remote environment allowlist whenever explicit remote variables are requested.

Testing

Extend the environment-filtering test to verify that SystemRoot, TEMP, and TMP survive alongside requested variables while unrequested secrets remain excluded.

## Why

When Codex runs on Unix and launches a stdio MCP server on a Windows executor, explicit remote environment variables activate an allowlist based on Unix defaults. This can filter out Windows runtime and temporary-directory variables.

## What changed

Include `SYSTEMROOT`, `TEMP`, and `TMP` in the remote environment allowlist whenever explicit remote variables are requested.

## Testing

Extend the environment-filtering test to verify that `SystemRoot`, `TEMP`, and `TMP` survive alongside requested variables while unrequested secrets remain excluded.

GitOrigin-RevId: 059c9e23833be66aaf5b65ba5f95013f94f0f792
@copyberry
copyberry Bot force-pushed the copyberry/codex-internal-to-codex-oss/059c9e23833be66aaf5b65ba5f95013f94f0f792 branch from 04ec418 to 7d3e696 Compare October 2, 2026 00:46
@copyberry
copyberry Bot merged commit 7d3e696 into main Oct 2, 2026
1 check failed
@copyberry
copyberry Bot deleted the copyberry/codex-internal-to-codex-oss/059c9e23833be66aaf5b65ba5f95013f94f0f792 branch October 2, 2026 00:46
@github-actions

github-actions Bot commented Oct 2, 2026

Copy link
Copy Markdown
Contributor


Thank you for your submission, we really appreciate it. Like many open-source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution. You can sign the CLA by just posting a Pull Request Comment same as the below format.


I have read the CLA Document and I hereby sign the CLA


You can retrigger this bot by commenting recheck in this Pull Request. Posted by the CLA Assistant Lite bot.

@github-actions github-actions Bot locked and limited conversation to collaborators Oct 2, 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.

1 participant