{"record":{"id":"728e77dbdd8d6e0e","repo":"openai/codex","slug":"package-name-is-installed-but-missing-its-packag-728e77","errorCode":null,"errorMessage":"{PACKAGE_NAME} is installed but missing its packaged codex binary at {path}","messagePattern":"(.+?) is installed but missing its packaged codex binary at (.+?)","errorType":"exception","errorClass":"FileNotFoundError","httpStatus":null,"severity":"error","filePath":"sdk/python-runtime/src/codex_cli_bin/__init__.py","lineNumber":22,"sourceCode":"PACKAGE_NAME = \"openai-codex-cli-bin\"\nPACKAGE_METADATA_FILENAME = \"codex-package.json\"\n\n\ndef bundled_package_dir() -> Path:\n    path = Path(__file__).resolve().parent\n    metadata_path = path / PACKAGE_METADATA_FILENAME\n    if not metadata_path.is_file():\n        raise FileNotFoundError(\n            f\"{PACKAGE_NAME} is installed but missing its package metadata at {metadata_path}\"\n        )\n    return path\n\n\ndef bundled_codex_path() -> Path:\n    exe = \"codex.exe\" if os.name == \"nt\" else \"codex\"\n    path = bundled_package_dir() / \"bin\" / exe\n    if not path.is_file():\n        raise FileNotFoundError(\n            f\"{PACKAGE_NAME} is installed but missing its packaged codex binary at {path}\"\n        )\n    return path\n\n\ndef bundled_path_dir() -> Path | None:\n    path = bundled_package_dir() / \"codex-path\"\n    return path if path.is_dir() else None\n\n\n__all__ = [\n    \"PACKAGE_NAME\",\n    \"bundled_codex_path\",\n    \"bundled_package_dir\",\n    \"bundled_path_dir\",\n]\n","sourceCodeStart":4,"sourceCodeEnd":39,"githubUrl":"https://github.com/openai/codex/blob/339751715c64496cb86246bfb3935f40e309dd3d/sdk/python-runtime/src/codex_cli_bin/__init__.py#L4-L39","documentation":"Error \"{PACKAGE_NAME} is installed but missing its packaged codex binary at {path}\" thrown in openai/codex.","triggerScenarios":"Thrown at sdk/python-runtime/src/codex_cli_bin/__init__.py:22 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Reinstall the codex runtime package, ensuring the platform-specific wheel with the packaged binary is selected."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"339751715c64496cb86246bfb3935f40e309dd3d","analyzedAt":"2026-08-25T05:35:09.876Z","schemaVersion":2},"datasetVersion":"2026-08-25T06:17:31.827Z"}