Skip to content

codex 0.144.0 homebrew cask is missing codex-code-mode-host every command is failing with "failed to spawn code-mode host" #31906

Closed as duplicate

Description

@Ronit-Mathur

What version of Codex CLI is running?

0.144.0

What subscription do you have?

Enterprise

Which model were you using?

gpt-5.6-Sol

What platform is your computer?

No response

What terminal emulator and version are you using (if applicable)?

No response

Codex doctor report

What issue are you seeing?

Summary

Fresh brew install --cask codex (0.144.0) is totally unusable. Every command fails before running:

failed to spawn code-mode host /opt/homebrew/bin/codex-code-mode-host: No such file or directory (os error 2)

Even ls fails, because code-mode routes all exec through this sidecar.

Cause

0.144.0 needs a codex-code-mode-host sidecar, but the cask installs only the codex binary. Casks/c/codex.rb declares just:

binary "codex-#{arch}-#{os}", target: "codex"

brew info --cask codex confirms: no codex-code-mode-host in the artifacts.

Cask-only bug — other channels ship the sidecar:

  • npm @openai/[email protected] has vendor/aarch64-apple-darwin/bin/codex-code-mode-host
  • ChatGPT desktop app bundles it in Contents/Resources/

Environment

  • codex-cli 0.144.0 (Homebrew cask), macOS, Apple Silicon (arm64)

What steps can reproduce the bug?

Fresh installation of codex newest version with homebrew

What is the expected behavior?

No response

Additional information

No response

Activity

  1. added
    bug
    on Jul 9, 2026
  2. added
    CLI
    tool-calls
    on Jul 9, 2026
  3. github-actions commented on Jul 9, 2026

    @github-actions
    Contributor
  4. mobiletoly commented on Jul 9, 2026

    @mobiletoly

    upgraded. have exactly the same issue. so effectively codex CLI is unusable.

  5. wonderg commented on Jul 9, 2026

    @wonderg

    same problem here. only possible solution now is

    
    npm install -g @openai/[email protected]
    
    hash -r
    
    which codex
    codex --version
    
    command -v codex-code-mode-host```
    
  6. afvca commented on Jul 9, 2026

    @afvca

    It seems this only affects gpt-5.6 models. 5.5 is working fine.

  7. productspace-gh commented on Jul 9, 2026

    @productspace-gh

    Same here. From codex itself:
    That confirms a Codex 1.44 packaging/launcher regression, not an Xcode MCP problem. MCP connects successfully, but Codex fails before invoking it because the code-mode helper is missing at:

    /opt/homebrew/bin/codex-code-mode-host

    codex doctor apparently does not validate that helper. The useful bug report is: 1.44, macOS/Apple Silicon, doctor passes, Xcode MCP connects, every tool call fails spawning that missing executable.
    Downgrading to the prior Codex version is the immediate workaround.

  8. raspverry commented on Jul 9, 2026

    @raspverry

    I fixed this issue with this.

    `
    set -euo pipefail

    version="0.144.0"
    tmp="$(mktemp -d)"
    trap 'rm -rf "$tmp"' EXIT

    url="$(
    curl -fsSL "https://api.github.com/repos/openai/codex/releases?per_page=20" |
    python3 -c '
    import json, sys

    version = "0.144.0"
    releases = json.load(sys.stdin)
    release = next(
    (r for r in releases if r["tag_name"].endswith(version)),
    None,
    )
    if release is None:
    raise SystemExit("Release not found")

    assets = [
    a for a in release["assets"]
    if "codex-code-mode-host" in a["name"]
    and "aarch64-apple-darwin" in a["name"]
    and not a["name"].endswith((".sha256", ".sig"))
    ]
    if not assets:
    raise SystemExit("Host asset not found")

    assets.sort(key=lambda a: (
    not a["name"].endswith(".tar.gz"),
    a["name"],
    ))
    print(assets[0]["browser_download_url"])
    '
    )"

    asset="$tmp/${url##*/}"
    mkdir "$tmp/unpacked"
    curl -fL "$url" -o "$asset"

    case "$asset" in
    .tar.gz|.tgz|.tar.zst|.tar.xz)
    tar -xf "$asset" -C "$tmp/unpacked"
    ;;
    *.zip)
    ditto -x -k "$asset" "$tmp/unpacked"
    ;;
    *)
    cp "$asset" "$tmp/unpacked/codex-code-mode-host-aarch64-apple-darwin"
    ;;
    esac

    host="$(find "$tmp/unpacked" -type f -name 'codex-code-mode-host*' | head -n 1)"
    test -n "$host"
    file "$host" | grep -Eq 'Mach-O.*(arm64|universal)'

    install -m 0755 "$host" /opt/homebrew/bin/codex-code-mode-host
    ls -la /opt/homebrew/bin/codex-code-mode-host
    `

  9. tomjod commented on Jul 9, 2026

    @tomjod

    Same problem here

  10. NorthSeven-02 commented on Jul 10, 2026

    @NorthSeven-02

    same as 0.144.0 gpt-5.6-Sol for /opt/homebrew/bin/codex-code-mode-host: No such file or directory

  11. sibbl commented on Jul 10, 2026

    @sibbl

    lol so Codex just wasted a full 5 hour window because of this bug. What a waste of tokens.

    Image

    Looking forward to a fix! Brew reinstall etc didn't work. Codex can't fix itself either, as it seems.

  12. chess-oai commented on Aug 15, 2026

    @chess-oai
    Contributor

    thanks for the reports here: this was fixed in the 0.144.1 hotfix, and homebrew was updated to that release in Homebrew/homebrew-cask#274225

    the same issue was tracked in #31831, which is now closed as completed, so i’m closing this duplicate too

    if the missing codex-code-mode-host error still reproduces on a current homebrew release, please share codex --version and brew info --cask codex and we can take another look

  13. darccio commented on Oct 25, 2026

    @darccio

    @chess-oai This still happens on 0.164.0, which doesn't contain codex-code-mode-host:

    > brew info --cask codex
    
    ==> codex ✔ (Codex): 0.164.0
    OpenAI's coding agent that runs in your terminal
    https://github.com/openai/codex
    Installed (on request)
    /home/linuxbrew/.linuxbrew/Caskroom/codex/0.164.0 (444.3MB)
      Installed using the internal formulae.brew.sh API on 2026-10-25 at 11:55:45
    From: https://github.com/Homebrew/homebrew-cask/blob/HEAD/Casks/c/codex.rb
    ==> Artifacts
    bin/codex (Binary)
    bin/codex completion (base_name: codex, shells: bash, zsh, fish) (Generated Completion)
    ==> Downloading https://formulae.brew.sh/api/cask/codex.json
    ==> Analytics
    install: 159,654 (30 days), 370,463 (90 days), 958,847 (365 days)
    
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

    CLIbugtool-calls

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions