{"record":{"id":"96b0189c21f41f36","repo":"openai/codex","slug":"package-name-is-installed-but-missing-its-packag","errorCode":null,"errorMessage":"{PACKAGE_NAME} is installed but missing its package metadata at {metadata_path}","messagePattern":"(.+?) is installed but missing its package metadata at (.+?)","errorType":"exception","errorClass":"FileNotFoundError","httpStatus":null,"severity":"error","filePath":"sdk/python-runtime/src/codex_cli_bin/__init__.py","lineNumber":12,"sourceCode":"import os\nfrom pathlib import Path\n\nPACKAGE_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","sourceCodeStart":1,"sourceCodeEnd":30,"githubUrl":"https://github.com/openai/codex/blob/339751715c64496cb86246bfb3935f40e309dd3d/sdk/python-runtime/src/codex_cli_bin/__init__.py#L1-L30","documentation":"Error \"{PACKAGE_NAME} is installed but missing its package metadata at {metadata_path}\" thrown in openai/codex.","triggerScenarios":"Thrown at sdk/python-runtime/src/codex_cli_bin/__init__.py:12 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Reinstall the codex runtime package so its package metadata is restored."],"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"}