Summary
The codex module installer downloads only the codex binary from the GitHub release. Since codex ~0.153.x, the CLI expects a companion executable codex-code-mode-host (shipped as a separate release artifact). Without it, codex starts with:
⚠ Code Mode is unavailable because failed to spawn code-mode host
/home/coder/.local/bin/codex-code-mode-host: host executable was not found.
Code mode will fail closed; enable `features.code_mode_host` and install `codex-code-mode-host`.
and — more importantly — the workspace exec tool fails to start entirely, so the agent cannot run any shell commands (agent replies with "the workspace execution tool failed to start"). code_mode_host is a stable feature flag defaulting to true in 0.153.x, so this affects everyone who gets the new version through the module.
Additionally, codex doctor reports the search (ripgrep) command as broken because the bare standalone binary has no bundled rg.
Root cause
registry/coder-labs/modules/codex/scripts/install.sh.tftpl (download_codex) fetches:
https://github.com/openai/codex/releases/download/rust-v<ver>/codex-<target>.tar.gz
and extracts only codex-<target>. The same release also publishes codex-code-mode-host-<target>.tar.gz, which is never fetched.
Repro
- Template with the codex module (
codex_version = "latest"), rebuild a workspace on/after the rust-v0.153.x releases.
- In the workspace, run
codex and ask it to run any shell command.
Suggested fix
In install.sh.tftpl, after installing codex, also download and install codex-code-mode-host-<target> from the same release tag into $HOME/.local/bin/codex-code-mode-host (guarded so older versions without the artifact don't fail the install).
Workaround for affected workspaces:
v="0.153.4"
curl -fsSL "https://github.com/openai/codex/releases/download/rust-v$v/codex-code-mode-host-x86_64-unknown-linux-musl.tar.gz" | tar -xz
install -m755 codex-code-mode-host-x86_64-unknown-linux-musl "$HOME/.local/bin/codex-code-mode-host"
Related upstream artifact list: https://github.com/openai/codex/releases/latest
Summary
The codex module installer downloads only the
codexbinary from the GitHub release. Since codex ~0.153.x, the CLI expects a companion executablecodex-code-mode-host(shipped as a separate release artifact). Without it, codex starts with:and — more importantly — the workspace exec tool fails to start entirely, so the agent cannot run any shell commands (agent replies with "the workspace execution tool failed to start").
code_mode_hostis astablefeature flag defaulting totruein 0.153.x, so this affects everyone who gets the new version through the module.Additionally,
codex doctorreports the search (ripgrep) command as broken because the bare standalone binary has no bundledrg.Root cause
registry/coder-labs/modules/codex/scripts/install.sh.tftpl(download_codex) fetches:and extracts only
codex-<target>. The same release also publishescodex-code-mode-host-<target>.tar.gz, which is never fetched.Repro
codex_version = "latest"), rebuild a workspace on/after the rust-v0.153.x releases.codexand ask it to run any shell command.Suggested fix
In
install.sh.tftpl, after installingcodex, also download and installcodex-code-mode-host-<target>from the same release tag into$HOME/.local/bin/codex-code-mode-host(guarded so older versions without the artifact don't fail the install).Workaround for affected workspaces:
Related upstream artifact list: https://github.com/openai/codex/releases/latest