Skip to content

Backport Windows remote MCP environment preservation to 0.160 - #51121

Merged
andrewgu-oai merged 1 commit into
release/0.160from
release/0.160.1-windows-mcp-env
Oct 5, 2026
Merged

andrewgu-oai merged 1 commit into
release/0.160from
release/0.160.1-windows-mcp-env

Conversation

@andrewgu-oai

@andrewgu-oai andrewgu-oai commented Oct 5, 2026 •

Copy link
Copy Markdown
Contributor

Backport #50129 to the 0.160 release line so a Unix host can start remote stdio MCP servers on Windows when explicit remote environment variables are configured.

Preserve SYSTEMROOT, TEMP, and TMP in the remote environment allowlist. The existing regression test checks these variables survive while unrequested secrets remain excluded.

This is the exact single-file patch from #50129, based on the immutable 0.160.0 release's content commit (cb7799623b2241f536d799f2d46259148fb987ce). No unrelated main changes are included.

Validation:

  • Patch ID matches Preserve Windows environment variables for remote MCP servers #50129 exactly: 990a7674801ac5adbc6c8c6380568e18b3d396e2.
  • cargo build -p codex-cli --bin codex passed.
  • just test -p codex-rmcp-client: 332 passed, 9 skipped, 4 setup failures initially. After building the CLI, all three streamable_http_remote integration tests passed on retry. The remaining OAuth auth-status test cannot create its lock directory in the read-only local home.
  • The remote environment filtering regression passed, including preservation of Windows variables and exclusion of unrequested secrets.
  • Core MCP environment-propagation integration validation is in progress.
  • The supported publisher dry run selects 0.160.1 from the exact candidate SHA.

CI currently reports unrelated failures in unchanged formatter tests, lint imports, spelling checks, manifest-feature exceptions, and unlinked-file checks. The Linux and Windows production build checks passed; remaining checks are running.

Backport #50129. Preserve SYSTEMROOT, TEMP, and TMP when explicit remote environment variables enable filtering.
@github-actions

github-actions Bot commented Oct 5, 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.

@andrewgu-oai
andrewgu-oai marked this pull request as ready for review October 5, 2026 16:43
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 5, 2026 •

Copy link
Copy Markdown
Contributor

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-05T16:46:55.665880Z b30ce51 Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: b30ce510b0

ℹ️ About Codex in GitHub

Your team has set up Codex to 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 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

let env = shell_environment::create_env_from_vars(
[
("PATH".to_string(), "/remote/bin".to_string()),
("SystemRoot".to_string(), r"C:\Windows".to_string()),

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Add integration coverage for the remote MCP launch

When a Unix orchestrator launches a Windows MCP server with a source = "remote" variable, this test calls the private remote_env_policy helper and manually recreates the exec-server conversion, so it can pass even if the actual launch path fails to classify the variable or transmit the allowlist in ExecParams. Add an integration test through the remote MCP launch path that verifies SYSTEMROOT, TEMP, and TMP survive while an unrequested secret does not.

AGENTS.md reference: AGENTS.md:L112-L121

Useful? React with 👍 / 👎.

@andrewgu-oai
andrewgu-oai merged commit 91c0ea5 into release/0.160 Oct 5, 2026
25 of 35 checks passed
@andrewgu-oai
andrewgu-oai deleted the release/0.160.1-windows-mcp-env branch October 5, 2026 17:00
@github-actions github-actions Bot locked and limited conversation to collaborators Oct 5, 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