code-mode standalone: Add client and consume with packaging - #27726
code-mode standalone: Add client and consume with packaging#27726cconger wants to merge 9 commits into
Conversation
There was a problem hiding this comment.
💡 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".
| 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(), | ||
| }; |
There was a problem hiding this comment.
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 👍 / 👎.
| self.current_session() | ||
| .await | ||
| .ok_or_else(|| "code mode session is unavailable".to_string())? |
There was a problem hiding this comment.
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 👍 / 👎.
09a5fdb to
9a2a954
Compare
9a2a954 to
80b70f2
Compare
Compare with previous
This is phase 3 of a 4 phase stack:
CodeModeSessionProviderto use new binaryLand and distribute the complete IPC path before making it the default.