openai/codex · error · FileNotFoundError

{PACKAGE_NAME} is installed but missing its packaged codex b

Error message

{PACKAGE_NAME} is installed but missing its packaged codex binary at {path}

What it means

Error "{PACKAGE_NAME} is installed but missing its packaged codex binary at {path}" thrown in openai/codex.

Source

Thrown at sdk/python-runtime/src/codex_cli_bin/__init__.py:22

PACKAGE_NAME = "openai-codex-cli-bin"
PACKAGE_METADATA_FILENAME = "codex-package.json"


def bundled_package_dir() -> Path:
    path = Path(__file__).resolve().parent
    metadata_path = path / PACKAGE_METADATA_FILENAME
    if not metadata_path.is_file():
        raise FileNotFoundError(
            f"{PACKAGE_NAME} is installed but missing its package metadata at {metadata_path}"
        )
    return path


def bundled_codex_path() -> Path:
    exe = "codex.exe" if os.name == "nt" else "codex"
    path = bundled_package_dir() / "bin" / exe
    if not path.is_file():
        raise FileNotFoundError(
            f"{PACKAGE_NAME} is installed but missing its packaged codex binary at {path}"
        )
    return path


def bundled_path_dir() -> Path | None:
    path = bundled_package_dir() / "codex-path"
    return path if path.is_dir() else None


__all__ = [
    "PACKAGE_NAME",
    "bundled_codex_path",
    "bundled_package_dir",
    "bundled_path_dir",
]

View on GitHub (pinned to 339751715c)

Solutions

  1. Reinstall the codex runtime package, ensuring the platform-specific wheel with the packaged binary is selected.

When it happens

Trigger: Thrown at sdk/python-runtime/src/codex_cli_bin/__init__.py:22 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of openai/codex@339751715c (2026-08-25). Data as JSON: /api/errors/728e77dbdd8d6e0e. Report an issue: GitHub.