Skip to content

[2/8] Support piped stdin in exec process API#18086

Merged
aibrahim-oai merged 1 commit intomainfrom
dev/remote-mcp-exec-stdin
Apr 16, 2026
Merged

[2/8] Support piped stdin in exec process API#18086
aibrahim-oai merged 1 commit intomainfrom
dev/remote-mcp-exec-stdin

Conversation

@aibrahim-oai
Copy link
Copy Markdown
Collaborator

@aibrahim-oai aibrahim-oai commented Apr 16, 2026

Summary

  • Add an explicit stdin mode to process/start.
  • Keep normal non-interactive exec stdin closed while allowing pipe-backed processes.

Stack

o  #18027 [8/8] Fail exec client operations after disconnect
│
o  #18025 [7/8] Cover MCP stdio tests with executor placement
│
o  #18089 [6/8] Wire remote MCP stdio through executor
│
o  #18088 [5/8] Add executor process transport for MCP stdio
│
o  #18087 [4/8] Abstract MCP stdio server launching
│
o  #18020 [3/8] Add pushed exec process events
│
@  #18086 [2/8] Support piped stdin in exec process API
│
o  #18085 [1/8] Add MCP server environment config
│
o  main

Copy link
Copy Markdown
Contributor

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

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: 315ecdfb2c

ℹ️ 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/exec-server/src/protocol.rs Outdated
/// stdin see EOF immediately. Remote MCP stdio uses `Piped` because rmcp
/// must write JSON-RPC request bytes to the child process stdin after the
/// process has started.
pub stdin: ExecStdinMode,
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 Preserve backward-compatible default for stdin mode

Make stdin optional at the wire level. As added, ExecParams now requires stdin, so older process/start clients that omit it fail deserialization with invalid params instead of starting a process. There are existing JSON callers that don't send this field (for example in websocket process tests), so this change introduces a protocol break. Add a serde default of Closed.

Useful? React with 👍 / 👎.

@aibrahim-oai aibrahim-oai force-pushed the dev/remote-mcp-env-config branch from d91856d to fbdc10d Compare April 16, 2026 13:43
@aibrahim-oai aibrahim-oai force-pushed the dev/remote-mcp-exec-stdin branch 2 times, most recently from cd30150 to 8978634 Compare April 16, 2026 13:59
@aibrahim-oai aibrahim-oai force-pushed the dev/remote-mcp-env-config branch from fbdc10d to 696aaba Compare April 16, 2026 13:59
Base automatically changed from dev/remote-mcp-env-config to main April 16, 2026 15:50
aibrahim-oai added a commit that referenced this pull request Apr 16, 2026
## Summary
- Add an MCP server environment setting with local as the default.
- Thread the default through config serialization, schema generation,
and existing config fixtures.

## Stack
```text
o  #18027 [8/8] Fail exec client operations after disconnect
│
o  #18025 [7/8] Cover MCP stdio tests with executor placement
│
o  #18089 [6/8] Wire remote MCP stdio through executor
│
o  #18088 [5/8] Add executor process transport for MCP stdio
│
o  #18087 [4/8] Abstract MCP stdio server launching
│
o  #18020 [3/8] Add pushed exec process events
│
o  #18086 [2/8] Support piped stdin in exec process API
│
@  #18085 [1/8] Add MCP server environment config
│
o  main
```

Co-authored-by: Codex <noreply@openai.com>
@aibrahim-oai aibrahim-oai force-pushed the dev/remote-mcp-exec-stdin branch 2 times, most recently from 1c5a436 to f99255d Compare April 16, 2026 16:16
Copy link
Copy Markdown
Contributor

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

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: f99255d45c

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

pub env: HashMap<String, String>,
pub tty: bool,
/// Keep non-tty stdin writable through `process/write`.
pub pipe_stdin: bool,
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 default for omitted pipeStdin in ExecParams

Make pipe_stdin backward-compatible at the wire level. As a required bool without #[serde(default)], older process/start clients that omit pipeStdin now fail deserialization (invalid params) instead of starting a process. This is a protocol break for existing JSON-RPC callers; defaulting to false preserves prior behavior.

Useful? React with 👍 / 👎.

@aibrahim-oai aibrahim-oai force-pushed the dev/remote-mcp-exec-stdin branch 2 times, most recently from 893c39b to ed6b28c Compare April 16, 2026 16:43
Add pipe_stdin to process/start so non-tty processes can opt into a writable stdin pipe for process/write.

Co-authored-by: Codex <noreply@openai.com>
@aibrahim-oai aibrahim-oai force-pushed the dev/remote-mcp-exec-stdin branch from ed6b28c to 086ae0a Compare April 16, 2026 16:44
@aibrahim-oai aibrahim-oai merged commit 2ca270d into main Apr 16, 2026
35 of 36 checks passed
@aibrahim-oai aibrahim-oai deleted the dev/remote-mcp-exec-stdin branch April 16, 2026 17:30
@github-actions github-actions bot locked and limited conversation to collaborators Apr 16, 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