Skip to content

Add opt-in gRPC over stdio for the code-mode host - #52723

Merged
copyberry[bot] merged 1 commit into
mainfrom
copyberry/codex-internal-to-codex-oss/31389d8540de236b8e0571d3c24e29e117b75c4a
Oct 9, 2026
Merged

copyberry[bot] merged 1 commit into
mainfrom
copyberry/codex-internal-to-codex-oss/31389d8540de236b8e0571d3c24e29e117b75c4a

Conversation

@copyberry

@copyberry copyberry Bot commented Oct 9, 2026 •

Copy link
Copy Markdown

Add opt-in gRPC over stdio for the code-mode host

What changed

  • Add grpc+stdio:// as a host transport and the disabled-by-default code_mode_host_grpc feature flag to select it.
  • Share a lazy HTTP/2 channel and host process across code-mode sessions while keeping session state isolated.
  • Use HTTP/2 keepalives to detect unresponsive hosts, kill and reap disconnected children, and spawn a fresh host on reconnect. Exit the host when its stdio connection closes.

Testing

Add coverage for shared-host session isolation, host exit on stdin EOF, and recovery after an unresponsive host is reaped. Exercise nested tool calls with both legacy stdio and gRPC stdio, asserting that the feature flag selects the expected transport.

## What changed

- Add `grpc+stdio://` as a host transport and the disabled-by-default `code_mode_host_grpc` feature flag to select it.
- Share a lazy HTTP/2 channel and host process across code-mode sessions while keeping session state isolated.
- Use HTTP/2 keepalives to detect unresponsive hosts, kill and reap disconnected children, and spawn a fresh host on reconnect. Exit the host when its stdio connection closes.

## Testing

Add coverage for shared-host session isolation, host exit on stdin EOF, and recovery after an unresponsive host is reaped. Exercise nested tool calls with both legacy stdio and gRPC stdio, asserting that the feature flag selects the expected transport.

GitOrigin-RevId: 31389d8540de236b8e0571d3c24e29e117b75c4a
@copyberry
copyberry Bot force-pushed the copyberry/codex-internal-to-codex-oss/31389d8540de236b8e0571d3c24e29e117b75c4a branch from 888e237 to 2dc0791 Compare October 9, 2026 23:26
@chatgpt-codex-connector

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 πŸ”„ Running since 2026-10-09T23:26:45.802576Z 888e237 PR opened
ℹ️ 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.

@copyberry
copyberry Bot merged commit 2dc0791 into main Oct 9, 2026
15 of 24 checks passed
@copyberry
copyberry Bot deleted the copyberry/codex-internal-to-codex-oss/31389d8540de236b8e0571d3c24e29e117b75c4a branch October 9, 2026 23:26
@github-actions github-actions Bot locked and limited conversation to collaborators Oct 9, 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