Skip to content

bug(coder-labs/codex): install.sh misses codex-code-mode-host, breaking codex >= 0.153 exec tool #1103

Description

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

  1. Template with the codex module (codex_version = "latest"), rebuild a workspace on/after the rust-v0.153.x releases.
  2. 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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions