Skip to content

code-mode: fall back to using in process v8 if we fail to resolve external process - #31899

Merged
cconger merged 2 commits into
mainfrom
cconger/owned-process-host-fallback
Jul 9, 2026
Merged

code-mode: fall back to using in process v8 if we fail to resolve external process#31899
cconger merged 2 commits into
mainfrom
cconger/owned-process-host-fallback

Conversation

@cconger

@cconger cconger commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

Why

Not every Codex distribution currently includes the codex-code-mode-host companion binary. Enabling the process-host feature should not make code mode unavailable on those surfaces while packaging support is being completed.

What changed

  • Fall back to an in-process code-mode session only when spawning the companion binary returns io::ErrorKind::NotFound.
  • Keep permission, handshake, timeout, and other host failures visible instead of silently falling back.
  • Store the provider's owned-process/in-process choice as one enum-backed state so later sessions reuse the fallback decision.
  • Preserve the underlying spawn io::Error while retaining the host path in the displayed error.
  • Update provider, CodeModeService, and end-to-end coverage to verify successful fallback execution.

Test plan

  • just test -p codex-code-mode
  • just test -p codex-core missing_process_host

@cconger
cconger requested a review from a team as a code owner July 9, 2026 21:04

@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: 4bed5777db

ℹ️ 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/src/remote_session.rs
Comment thread codex-rs/code-mode/src/remote_session/connection.rs Outdated
Comment thread codex-rs/code-mode/src/remote_session.rs Outdated
@cconger
cconger merged commit 8cf9a1b into main Jul 9, 2026
35 checks passed
@cconger
cconger deleted the cconger/owned-process-host-fallback branch July 9, 2026 21:40
@github-actions github-actions Bot locked and limited conversation to collaborators Jul 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.

2 participants