Skip to content

code-mode standalone: extract protocol and add host crate - #27724

Merged
cconger merged 3 commits into
mainfrom
cconger/code-mode-host-1-protocol-host
Jun 12, 2026
Merged

code-mode standalone: extract protocol and add host crate#27724
cconger merged 3 commits into
mainfrom
cconger/code-mode-host-1-protocol-host

Conversation

@cconger

@cconger cconger commented Jun 12, 2026

Copy link
Copy Markdown
Contributor

This is phase 1 of a 4 phase stack:

  1. Add protocol and host crates for new IPC code mode implementation
  2. Create the new standalone binary
  3. Create a new IPC CodeModeSessionProvider to use new binary
  4. Remove v8 from core and only use IPC provider

Add protocol and host crates for new IPC code mode implementation

Establish a clean process boundary without changing the existing in-process behavior.

  • Add the codex-code-mode-protocol crate for shared session, runtime, response, and tool-definition types.
  • Move protocol-facing code out of the V8-backed implementation.
  • Add a buildable codex-code-mode-host crate as the foundation for the standalone process.
  • Keep the existing in-process runtime as the active implementation.

@cconger cconger changed the title code-mode: extract protocol and add host crate code-mode standalone: extract protocol and add host crate Jun 12, 2026

@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: 131d87aefc

ℹ️ 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/code-mode-protocol/Cargo.toml
Comment thread codex-rs/Cargo.toml
@cconger
cconger force-pushed the cconger/code-mode-host-1-protocol-host branch from 2607455 to 7f78a47 Compare June 12, 2026 02:35

/// A durable code-mode session owned by one Codex thread.
///
/// Cells executed in the same session share stored values. Separate sessions

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.

For my own understanding: are we going to allow multiple sessions in the same OS process, or will they have process isolation from each other?

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.

addressed offline.

///
/// Remote implementations should return `false` after their underlying
/// connection fails so callers can create a fresh session for later work.
fn is_alive(&self) -> 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.

nit: IME default trait methods often end up with surprising missing implementations, is there anything that could go wrong if a caller forgets to implement this?

@cconger
cconger force-pushed the cconger/code-mode-host-1-protocol-host branch from d19fd4b to 79d913b Compare June 12, 2026 05:12
@cconger
cconger merged commit aa46f2d into main Jun 12, 2026
59 of 61 checks passed
@cconger
cconger deleted the cconger/code-mode-host-1-protocol-host branch June 12, 2026 05:37
@github-actions github-actions Bot locked and limited conversation to collaborators Jun 12, 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