Skip to content

mcp: accept foreign absolute cwd for remote stdio - #29493

Merged
anp-oai merged 9 commits into
mainfrom
codex/remote-stdio-foreign-cwd
Jun 23, 2026
Merged

mcp: accept foreign absolute cwd for remote stdio#29493
anp-oai merged 9 commits into
mainfrom
codex/remote-stdio-foreign-cwd

Conversation

@anp-oai

@anp-oai anp-oai commented Jun 22, 2026

Copy link
Copy Markdown
Contributor

Why

Remote stdio MCP servers can run in an environment whose path convention differs from the Codex host. A Windows cwd such as C:\Users\openai\share is absolute for the executor but was rejected by a POSIX orchestrator.

Built on #29501, now merged, which only clarifies the host-native PathUri constructor name.

What changed

  • Deserialize MCP cwd values as LegacyAppPathString so config does not apply host path rules.
  • Interpret that spelling as host-native for local launches and convert it to PathUri at executor launch.
  • Skip host filesystem and command resolution checks for remote stdio in codex doctor.
  • Add host-independent config and executor-boundary coverage using the foreign path convention for each test platform.

Validation

  • just test -p codex-utils-path-uri -p codex-config -p codex-mcp -p codex-rmcp-client (408 passed)
  • just test -p codex-cli -p codex-rmcp-client (372 passed)
  • cargo check --workspace --tests
  • just test (11,311 passed; 43 unrelated environment/timing failures)
  • just fix -p codex-cli -p codex-config -p codex-core -p codex-mcp -p codex-mcp-extension -p codex-rmcp-client -p codex-tui

anp-oai added a commit that referenced this pull request Jun 22, 2026
anp-oai added a commit that referenced this pull request Jun 22, 2026
anp-oai added a commit that referenced this pull request Jun 23, 2026
anp-oai added a commit that referenced this pull request Jun 23, 2026
anp-oai added a commit that referenced this pull request Jun 23, 2026
@anp-oai
anp-oai force-pushed the codex/remote-stdio-foreign-cwd branch from 8882cb4 to 409302e Compare June 23, 2026 00:01
@anp-oai
anp-oai changed the base branch from main to codex/path-uri-host-native-path June 23, 2026 00:01
Base automatically changed from codex/path-uri-host-native-path to main June 23, 2026 00:02
anp-oai added a commit that referenced this pull request Jun 23, 2026
anp-oai added a commit that referenced this pull request Jun 23, 2026
anp-oai added a commit that referenced this pull request Jun 23, 2026
@anp-oai
anp-oai force-pushed the codex/remote-stdio-foreign-cwd branch from 409302e to ab091fd Compare June 23, 2026 00:04
@anp-oai
anp-oai marked this pull request as ready for review June 23, 2026 00:06
@anp-oai
anp-oai requested a review from a team as a code owner June 23, 2026 00:06
@anp-oai

anp-oai commented Jun 23, 2026

Copy link
Copy Markdown
Contributor Author

@codex review

@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: ab091fdc89

ℹ️ 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".

Comment thread codex-rs/cli/src/doctor.rs Outdated
Comment thread codex-rs/rmcp-client/src/stdio_server_launcher.rs Outdated
anp-oai added a commit that referenced this pull request Jun 23, 2026
anp-oai added a commit that referenced this pull request Jun 23, 2026
anp-oai added a commit that referenced this pull request Jun 23, 2026
@anp-oai
anp-oai force-pushed the codex/remote-stdio-foreign-cwd branch from aeed608 to b2bc69d Compare June 23, 2026 00:30
anp-oai added a commit that referenced this pull request Jun 23, 2026
anp-oai added a commit that referenced this pull request Jun 23, 2026
anp-oai added a commit that referenced this pull request Jun 23, 2026
@anp-oai

anp-oai commented Jun 23, 2026

Copy link
Copy Markdown
Contributor Author

@codex review

@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: 40b84c59fa

ℹ️ 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".

Comment thread codex-rs/cli/src/doctor.rs
anp-oai added a commit that referenced this pull request Jun 23, 2026
@anp-oai

anp-oai commented Jun 23, 2026

Copy link
Copy Markdown
Contributor Author

@codex review

@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: ebfc4e7e08

ℹ️ 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".

Comment thread codex-rs/cli/src/doctor.rs
@anp-oai
anp-oai force-pushed the codex/remote-stdio-foreign-cwd branch from ebfc4e7 to 843c5ba Compare June 23, 2026 01:07
params: Mutex<Option<ExecParams>>,
}

impl ExecBackend for RecordingExecBackend {

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.

not a fan of unit tests like these but I guess we don't have infra to write better integration ones.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I'll make a note for my split testing backlog

Comment thread codex-rs/rmcp-client/src/rmcp_client.rs Outdated
Comment thread codex-rs/codex-mcp/src/runtime.rs
@anp-oai

anp-oai commented Jun 23, 2026

Copy link
Copy Markdown
Contributor Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown
Contributor

Codex Review: Didn't find any major issues. Bravo.

Reviewed commit: 23a68149bc

ℹ️ 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".

@anp-oai
anp-oai enabled auto-merge (squash) June 23, 2026 01:26
@anp-oai
anp-oai merged commit 67009bc into main Jun 23, 2026
31 checks passed
@anp-oai
anp-oai deleted the codex/remote-stdio-foreign-cwd branch June 23, 2026 01:33
@github-actions github-actions Bot locked and limited conversation to collaborators Jun 23, 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.

2 participants