Issue body
What version of Codex CLI is running?
Source checkout of main at bb5054fe47abe73ecbbd454751066a28c89f4bb9 (codex-cli 0.0.0).
What subscription do you have?
N/A — this is a source-build failure before any API request or model invocation.
Which model were you using?
N/A.
What platform is your computer?
Darwin 25.6.0 arm64 arm
macOS 26.6 (25G72)
rustc 1.95.0 (59807616e 2026-04-14)
cargo 1.95.0 (f2d3ce0bd 2026-03-21)
toolchain: 1.95.0-aarch64-apple-darwin (repository override)
What terminal emulator and version are you using?
Not relevant; this reproduces during a non-interactive Cargo build.
Codex doctor report
Not available before applying the workaround because the documented source build does not produce a runnable local package.
What issue are you seeing?
The documented source-build flow in docs/install.md says to run:
cd codex/codex-rs
cargo build
cargo run --bin codex -- "explain this codebase to me"
This no longer works on a clean Apple Silicon checkout of current main.
There are two connected failures:
-
Building only codex-cli produces target/debug/codex, but not the now-required sibling executable target/debug/codex-code-mode-host. Running the CLI then reports:
/path/to/codex/codex-rs/target/debug/codex-code-mode-host: No such file or directory
-
Building the host explicitly fails while compiling v8 v150.4.0:
error: failed to run custom build command for v8 v150.4.0
static lib URL: https://github.com/denoland/rusty_v8/releases/download/v150.4.0/librusty_v8_ptrcomp_sandbox_release_aarch64-apple-darwin.a.gz
HTTP Error 404: Not Found
Failed to download V8 prebuilt archive from
https://github.com/denoland/rusty_v8/releases/download/v150.4.0/librusty_v8_ptrcomp_sandbox_release_aarch64-apple-darwin.a.gz
The failing filename is the sandbox-enabled ptrcomp_sandbox_release variant selected by v8_enable_sandbox. The Codex rusty-v8-v150.4.0 release contains the corresponding OpenAI-built archive and binding, and .github/actions/setup-rusty-v8/action.yml already downloads them and supplies:
RUSTY_V8_ARCHIVE
RUSTY_V8_SRC_BINDING_PATH
However, the documented direct Cargo/Just development path does not perform this setup. The repository's package builder contains similar download-and-verification logic, but it is not used by cargo build, just codex, or the source-build instructions.
This is related to, but different from, #31906. That issue concerns a Homebrew package missing the sidecar. This report concerns a clean build from source and the sandboxed V8 dependency setup.
The likely regression window is the combination of:
97576b1794 — run code mode exclusively through the standalone host; and
2e32d95894 — enable sandboxed V8 for code mode.
What steps can reproduce the bug?
Starting from a clean checkout:
git clone https://github.com/openai/codex.git
cd codex/codex-rs
The previously sufficient command builds the CLI but not its required host.
cargo build -p codex-cli --bin codex
./target/debug/codex
Attempt to build the missing host.
cargo build -p codex-code-mode-host --bin codex-code-mode-host
The last command fails on the Deno rusty_v8 404 shown above. Running the documented plain cargo build also reaches the same V8 failure.
What is the expected behavior?
The documented build-from-source command should produce a runnable local Codex installation from a clean checkout.
If codex-code-mode-host is mandatory, the supported local build command should:
- build both
codex and codex-code-mode-host;
- place them where runtime discovery expects them;
- obtain and checksum-verify the correct sandbox-enabled V8 archive and Rust binding automatically; and
- avoid requiring contributors to discover CI-only environment variables.
Suggested fix
Preferred approach:
-
Extract/reuse the verified V8 artifact setup already implemented by scripts/codex_package and .github/actions/setup-rusty-v8 as a first-class local developer helper.
-
Add a supported just build recipe that runs that helper and then performs one grouped Cargo build for:
cargo build
-p codex-cli --bin codex
-p codex-code-mode-host --bin codex-code-mode-host
-
Make just codex ensure the host has been built with the same V8 configuration before launching the CLI.
-
Update docs/install.md to use this supported command instead of raw cargo build / cargo run --bin codex.
-
Add a clean-checkout macOS arm64 CI smoke test that executes the documented source-build command and verifies both sibling binaries exist and start.
At minimum, the documentation should explain the two required binaries and show how to download and verify the Codex-hosted V8 pair before setting RUSTY_V8_ARCHIVE and RUSTY_V8_SRC_BINDING_PATH.
Confirmed workaround
Downloading the three assets below from the rusty-v8-v150.4.0 Codex release, verifying the supplied checksum file, and exporting the two paths makes the grouped build succeed:
librusty_v8_ptrcomp_sandbox_release_aarch64-apple-darwin.a.gz
src_binding_ptrcomp_sandbox_release_aarch64-apple-darwin.rs
rusty_v8_ptrcomp_sandbox_release_aarch64-apple-darwin.sha256
export RUSTY_V8_ARCHIVE=/path/to/librusty_v8_ptrcomp_sandbox_release_aarch64-apple-darwin.a.gz
export RUSTY_V8_SRC_BINDING_PATH=/path/to/src_binding_ptrcomp_sandbox_release_aarch64-apple-darwin.rs
cargo build
-p codex-cli --bin codex
-p codex-code-mode-host --bin codex-code-mode-host
./target/debug/codex
With those overrides, both arm64 Mach-O binaries build successfully and the CLI resolves the host beside itself.
Issue body
What version of Codex CLI is running?
Source checkout of
mainatbb5054fe47abe73ecbbd454751066a28c89f4bb9(codex-cli 0.0.0).What subscription do you have?
N/A — this is a source-build failure before any API request or model invocation.
Which model were you using?
N/A.
What platform is your computer?
Darwin 25.6.0 arm64 arm
macOS 26.6 (25G72)
rustc 1.95.0 (59807616e 2026-04-14)
cargo 1.95.0 (f2d3ce0bd 2026-03-21)
toolchain: 1.95.0-aarch64-apple-darwin (repository override)
What terminal emulator and version are you using?
Not relevant; this reproduces during a non-interactive Cargo build.
Codex doctor report
Not available before applying the workaround because the documented source build does not produce a runnable local package.
What issue are you seeing?
The documented source-build flow in
docs/install.mdsays to run:cd codex/codex-rs
cargo build
cargo run --bin codex -- "explain this codebase to me"
This no longer works on a clean Apple Silicon checkout of current
main.There are two connected failures:
Building only
codex-cliproducestarget/debug/codex, but not the now-required sibling executabletarget/debug/codex-code-mode-host. Running the CLI then reports:/path/to/codex/codex-rs/target/debug/codex-code-mode-host: No such file or directory
Building the host explicitly fails while compiling
v8 v150.4.0:error: failed to run custom build command for
v8 v150.4.0static lib URL: https://github.com/denoland/rusty_v8/releases/download/v150.4.0/librusty_v8_ptrcomp_sandbox_release_aarch64-apple-darwin.a.gz
HTTP Error 404: Not Found
Failed to download V8 prebuilt archive from
https://github.com/denoland/rusty_v8/releases/download/v150.4.0/librusty_v8_ptrcomp_sandbox_release_aarch64-apple-darwin.a.gz
The failing filename is the sandbox-enabled
ptrcomp_sandbox_releasevariant selected byv8_enable_sandbox. The Codexrusty-v8-v150.4.0release contains the corresponding OpenAI-built archive and binding, and.github/actions/setup-rusty-v8/action.ymlalready downloads them and supplies:RUSTY_V8_ARCHIVE
RUSTY_V8_SRC_BINDING_PATH
However, the documented direct Cargo/Just development path does not perform this setup. The repository's package builder contains similar download-and-verification logic, but it is not used by
cargo build,just codex, or the source-build instructions.This is related to, but different from, #31906. That issue concerns a Homebrew package missing the sidecar. This report concerns a clean build from source and the sandboxed V8 dependency setup.
The likely regression window is the combination of:
97576b1794— run code mode exclusively through the standalone host; and2e32d95894— enable sandboxed V8 for code mode.What steps can reproduce the bug?
Starting from a clean checkout:
git clone https://github.com/openai/codex.git
cd codex/codex-rs
The previously sufficient command builds the CLI but not its required host.
cargo build -p codex-cli --bin codex
./target/debug/codex
Attempt to build the missing host.
cargo build -p codex-code-mode-host --bin codex-code-mode-host
The last command fails on the Deno
rusty_v8404 shown above. Running the documented plaincargo buildalso reaches the same V8 failure.What is the expected behavior?
The documented build-from-source command should produce a runnable local Codex installation from a clean checkout.
If
codex-code-mode-hostis mandatory, the supported local build command should:codexandcodex-code-mode-host;Suggested fix
Preferred approach:
Extract/reuse the verified V8 artifact setup already implemented by
scripts/codex_packageand.github/actions/setup-rusty-v8as a first-class local developer helper.Add a supported
just buildrecipe that runs that helper and then performs one grouped Cargo build for:cargo build
-p codex-cli --bin codex
-p codex-code-mode-host --bin codex-code-mode-host
Make
just codexensure the host has been built with the same V8 configuration before launching the CLI.Update
docs/install.mdto use this supported command instead of rawcargo build/cargo run --bin codex.Add a clean-checkout macOS arm64 CI smoke test that executes the documented source-build command and verifies both sibling binaries exist and start.
At minimum, the documentation should explain the two required binaries and show how to download and verify the Codex-hosted V8 pair before setting
RUSTY_V8_ARCHIVEandRUSTY_V8_SRC_BINDING_PATH.Confirmed workaround
Downloading the three assets below from the
rusty-v8-v150.4.0Codex release, verifying the supplied checksum file, and exporting the two paths makes the grouped build succeed:librusty_v8_ptrcomp_sandbox_release_aarch64-apple-darwin.a.gz
src_binding_ptrcomp_sandbox_release_aarch64-apple-darwin.rs
rusty_v8_ptrcomp_sandbox_release_aarch64-apple-darwin.sha256
export RUSTY_V8_ARCHIVE=/path/to/librusty_v8_ptrcomp_sandbox_release_aarch64-apple-darwin.a.gz
export RUSTY_V8_SRC_BINDING_PATH=/path/to/src_binding_ptrcomp_sandbox_release_aarch64-apple-darwin.rs
cargo build
-p codex-cli --bin codex
-p codex-code-mode-host --bin codex-code-mode-host
./target/debug/codex
With those overrides, both arm64 Mach-O binaries build successfully and the CLI resolves the host beside itself.