Skip to content

[6/6] Fail exec client operations after disconnect#18027

Open
aibrahim-oai wants to merge 2 commits intomainfrom
dev/remote-mcp-exec-disconnect
Open

[6/6] Fail exec client operations after disconnect#18027
aibrahim-oai wants to merge 2 commits intomainfrom
dev/remote-mcp-exec-disconnect

Conversation

@aibrahim-oai
Copy link
Copy Markdown
Collaborator

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

Summary

  • Reject new exec-server client operations once the transport has disconnected.
  • Convert pending RPC calls into closed errors instead of synthetic server errors.
  • Cover pending read and later write behavior after remote executor disconnect.

Verification

  • just fmt
  • cargo check -p codex-exec-server

Stack

@  #18027 [6/6] Fail exec client operations after disconnect
│
o  #18212 [5/6] Wire executor-backed MCP stdio
│
o  #18087 [4/6] Abstract MCP stdio server launching
│
o  #18020 [3/6] Add pushed exec process events
│
o  #18086 [2/6] Support piped stdin in exec process API
│
o  #18085 [1/6] Add MCP server environment config
│
o  main

@aibrahim-oai aibrahim-oai force-pushed the dev/remote-mcp-exec-disconnect branch from 26e6cb2 to cbf2f50 Compare April 16, 2026 05:10
@aibrahim-oai aibrahim-oai force-pushed the dev/remote-mcp-stdio-tests branch 2 times, most recently from 04edeeb to db17256 Compare April 16, 2026 06:20
@aibrahim-oai aibrahim-oai force-pushed the dev/remote-mcp-exec-disconnect branch from cbf2f50 to a5fb6ce Compare April 16, 2026 06:20
@aibrahim-oai aibrahim-oai force-pushed the dev/remote-mcp-stdio-tests branch from db17256 to aa58931 Compare April 16, 2026 13:55
@aibrahim-oai aibrahim-oai force-pushed the dev/remote-mcp-exec-disconnect branch from a5fb6ce to d73da80 Compare April 16, 2026 13:55
@aibrahim-oai aibrahim-oai force-pushed the dev/remote-mcp-stdio-tests branch from aa58931 to c4a27cd Compare April 16, 2026 13:59
@aibrahim-oai aibrahim-oai force-pushed the dev/remote-mcp-exec-disconnect branch from d73da80 to 82da696 Compare April 16, 2026 13:59
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-stdio-tests branch from c4a27cd to 1e3bb61 Compare April 16, 2026 15:56
@aibrahim-oai aibrahim-oai force-pushed the dev/remote-mcp-exec-disconnect branch from 82da696 to 16f8737 Compare April 16, 2026 15:56
@aibrahim-oai aibrahim-oai force-pushed the dev/remote-mcp-stdio-tests branch from 1e3bb61 to fa90957 Compare April 16, 2026 16:13
@aibrahim-oai aibrahim-oai force-pushed the dev/remote-mcp-exec-disconnect branch from 16f8737 to 3967571 Compare April 16, 2026 16:13
@aibrahim-oai aibrahim-oai force-pushed the dev/remote-mcp-stdio-tests branch from fa90957 to e420153 Compare April 16, 2026 16:16
@aibrahim-oai aibrahim-oai force-pushed the dev/remote-mcp-exec-disconnect branch 3 times, most recently from b82920d to 418679b Compare April 16, 2026 16:29
@aibrahim-oai aibrahim-oai force-pushed the dev/remote-mcp-stdio-tests branch 2 times, most recently from 580771d to f694598 Compare April 16, 2026 16:42
@aibrahim-oai aibrahim-oai force-pushed the dev/remote-mcp-exec-disconnect branch 2 times, most recently from d2afcaa to d326394 Compare April 16, 2026 16:43
@aibrahim-oai aibrahim-oai force-pushed the dev/remote-mcp-stdio-tests branch from f694598 to c2713b6 Compare April 16, 2026 16:43
@aibrahim-oai aibrahim-oai force-pushed the dev/remote-mcp-exec-disconnect branch from d326394 to a7c7ede Compare April 16, 2026 16:44
@aibrahim-oai aibrahim-oai force-pushed the dev/remote-mcp-stdio-tests branch from c2713b6 to acd96bd Compare April 16, 2026 16:44
aibrahim-oai added a commit that referenced this pull request 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
```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
│
@  #18086 [2/8] Support piped stdin in exec process API
│
o  #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-disconnect branch from a7c7ede to f1324a4 Compare April 16, 2026 18:21
@aibrahim-oai aibrahim-oai force-pushed the dev/remote-mcp-stdio-tests branch from acd96bd to 88e5a56 Compare April 16, 2026 18:21
@aibrahim-oai aibrahim-oai force-pushed the dev/remote-mcp-exec-disconnect branch from f1324a4 to f05fcee Compare April 16, 2026 18:32
@aibrahim-oai aibrahim-oai force-pushed the dev/remote-mcp-stdio-tests branch 2 times, most recently from adbbe17 to c970502 Compare April 16, 2026 18:40
@aibrahim-oai aibrahim-oai force-pushed the dev/remote-mcp-exec-disconnect branch 12 times, most recently from 48d6f2d to 2ac989f Compare April 17, 2026 09:19
aibrahim-oai added a commit that referenced this pull request Apr 17, 2026
## Summary
- Add a pushed `ExecProcessEvent` stream alongside retained
`process/read` output.
- Publish local and remote output, exit, close, and failure events.
- Cover the event stream with shared local/remote exec process tests.

## Testing
- `cargo check -p codex-exec-server`
- `cargo check -p codex-rmcp-client`
- Not run: `cargo test` per repo instruction; CI will cover.

## Stack
```text
o  #18027 [6/6] Fail exec client operations after disconnect
│
o  #18212 [5/6] Wire executor-backed MCP stdio
│
o  #18087 [4/6] Abstract MCP stdio server launching
│
@  #18020 [3/6] Add pushed exec process events
│
o  #18086 [2/6] Support piped stdin in exec process API
│
o  #18085 [1/6] Add MCP server environment config
│
o  main
```

---------

Co-authored-by: Codex <noreply@openai.com>
aibrahim-oai added a commit that referenced this pull request Apr 17, 2026
## Summary
- Move local MCP stdio process startup behind a launcher trait.
- Preserve existing local stdio behavior while making transport creation
explicit.

## Stack
```text
o  #18027 [6/6] Fail exec client operations after disconnect
│
o  #18212 [5/6] Wire executor-backed MCP stdio
│
@  #18087 [4/6] Abstract MCP stdio server launching
│
o  #18020 [3/6] Add pushed exec process events
│
o  #18086 [2/6] Support piped stdin in exec process API
│
o  #18085 [1/6] Add MCP server environment config
│
o  main
```

---------

Co-authored-by: Codex <noreply@openai.com>
@aibrahim-oai aibrahim-oai force-pushed the dev/remote-mcp-executor-stdio-full-ci branch from 05c5a98 to 2b8b185 Compare April 17, 2026 19:38
@aibrahim-oai aibrahim-oai force-pushed the dev/remote-mcp-exec-disconnect branch from 2ac989f to 3f74a4b Compare April 17, 2026 19:39
@aibrahim-oai aibrahim-oai force-pushed the dev/remote-mcp-executor-stdio-full-ci branch from 2b8b185 to 8f30991 Compare April 17, 2026 19:40
@aibrahim-oai aibrahim-oai force-pushed the dev/remote-mcp-exec-disconnect branch from 3f74a4b to 92d13e7 Compare April 17, 2026 19:41
@aibrahim-oai aibrahim-oai force-pushed the dev/remote-mcp-executor-stdio-full-ci branch from 8f30991 to 93f49bf Compare April 17, 2026 19:42
@aibrahim-oai aibrahim-oai force-pushed the dev/remote-mcp-exec-disconnect branch from 92d13e7 to cab9201 Compare April 17, 2026 19:42
@aibrahim-oai aibrahim-oai force-pushed the dev/remote-mcp-executor-stdio-full-ci branch from 93f49bf to be849e0 Compare April 17, 2026 19:46
@aibrahim-oai aibrahim-oai force-pushed the dev/remote-mcp-exec-disconnect branch from cab9201 to b53f34f Compare April 17, 2026 19:46
@aibrahim-oai aibrahim-oai force-pushed the dev/remote-mcp-executor-stdio-full-ci branch from be849e0 to 0ac58e2 Compare April 17, 2026 20:03
@aibrahim-oai aibrahim-oai force-pushed the dev/remote-mcp-exec-disconnect branch from b53f34f to 31c25bf Compare April 17, 2026 20:04
@aibrahim-oai aibrahim-oai force-pushed the dev/remote-mcp-executor-stdio-full-ci branch from 0ac58e2 to 5615470 Compare April 18, 2026 05:06
@aibrahim-oai aibrahim-oai force-pushed the dev/remote-mcp-exec-disconnect branch from 31c25bf to 7c6544f Compare April 18, 2026 05:06
Add the executor-backed RMCP stdio transport, pass MCP runtime placement through manager construction, and cover stdio MCP tests with the remote-aware helpers.

Co-authored-by: Codex <noreply@openai.com>
@aibrahim-oai aibrahim-oai force-pushed the dev/remote-mcp-executor-stdio-full-ci branch from 5615470 to c219aeb Compare April 18, 2026 05:24
Reject new exec-server operations once the transport disconnects and convert pending RPC calls into closed errors. This lets remote MCP stdio calls surface executor loss immediately instead of waiting for the MCP tool timeout.

Co-authored-by: Codex <noreply@openai.com>
@aibrahim-oai aibrahim-oai force-pushed the dev/remote-mcp-exec-disconnect branch from 7c6544f to b8070ad Compare April 18, 2026 05:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant