Skip to content

code-mode standalone: Add client and consume with packaging - #27726

Closed
cconger wants to merge 9 commits into
mainfrom
cconger/code-mode-host-3-consumer
Closed

code-mode standalone: Add client and consume with packaging#27726
cconger wants to merge 9 commits into
mainfrom
cconger/code-mode-host-3-consumer

Conversation

@cconger

@cconger cconger commented Jun 12, 2026

Copy link
Copy Markdown
Contributor

Compare with previous

This is phase 3 of a 4 phase stack:

  1. Add protocol and host crates for new IPC code mode implementation code-mode standalone: extract protocol and add host crate #27724
  2. Create the new standalone binary code-mode standalone: add host binary  #27725
  3. Create a new IPC CodeModeSessionProvider to use new binary
  4. Remove v8 from core and only use IPC provider

Land and distribute the complete IPC path before making it the default.

  • Add codex-code-mode-client to launch the host and manage IPC sessions.
  • Make the core session provider injectable and add an opt-in IPC consumer path.
  • Package the host alongside Codex in release archives and local builds.
  • Add Bazel launchers and update installation scripts to locate and start the packaged host.
  • Exercise core integration tests through the standalone host.

@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: 24cc72e3e9

ℹ️ 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/core/src/thread_manager.rs
Comment on lines +572 to +579
let code_mode_session_provider =
match codex_utils_cargo_bin::cargo_bin("codex-code-mode-host") {
Ok(program) => IpcCodeModeSessionProvider::new(CodeModeHostCommand {
program,
args: Vec::new(),
}),
Err(_) => IpcCodeModeSessionProvider::default(),
};

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.

P2 Badge Do not fall back to an unbuilt code-mode host in Cargo tests

In a clean just test -p codex-core/nextest run, cargo_bin("codex-code-mode-host") has no CARGO_BIN_EXE_* for this other workspace package unless that binary was built separately; this fallback then uses the default provider, which only tries CODEX_CODE_MODE_HOST_PATH, a sibling of the test binary, or PATH. As a result, code-mode suite tests that construct TestCodex fail later with a spawn error instead of using a deterministic host path.

Useful? React with 👍 / 👎.

Comment on lines +97 to +99
self.current_session()
.await
.ok_or_else(|| "code mode session is unavailable".to_string())?

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 missing-cell results after resume

If the first code-mode action after resuming an old rollout is wait for a cell ID that was yielded before shutdown, no live session has been recreated, so this path now returns code mode session is unavailable before asking the session for a MissingCell result. Previously an empty in-process session produced the normal exec cell … not found tool output, which lets resumed conversations recover from stale cell IDs instead of surfacing a code-mode infrastructure error.

Useful? React with 👍 / 👎.

@cconger
cconger force-pushed the cconger/code-mode-host-3-consumer branch 5 times, most recently from 09a5fdb to 9a2a954 Compare June 12, 2026 05:13
@cconger
cconger force-pushed the cconger/code-mode-host-3-consumer branch from 9a2a954 to 80b70f2 Compare June 12, 2026 05:39
@cconger cconger closed this Jun 25, 2026
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