{"record":{"id":"17f76fc03480d278","repo":"openai/codex","slug":"unable-to-locate-the-pinned-codex-runtime-install","errorCode":null,"errorMessage":"Unable to locate the pinned Codex runtime. Install the published SDK build with its {RUNTIME_PKG_NAME} dependency, or set CodexConfig.codex_bin explicitly.","messagePattern":"Unable to locate the pinned Codex runtime\\. Install the published SDK build with its (.+?) dependency, or set CodexConfig\\.codex_bin explicitly\\.","errorType":"exception","errorClass":"FileNotFoundError","httpStatus":null,"severity":"error","filePath":"sdk/python/src/openai_codex/client.py","lineNumber":115,"sourceCode":"    if hasattr(params, \"model_dump\"):\n        dumped = params.model_dump(\n            by_alias=True,\n            exclude_none=True,\n            mode=\"json\",\n        )\n        if not isinstance(dumped, dict):\n            raise TypeError(\"Expected model_dump() to return dict\")\n        return dumped\n    if isinstance(params, dict):\n        return params\n    raise TypeError(f\"Expected generated params model or dict, got {type(params).__name__}\")\n\n\ndef _installed_codex_path() -> Path:\n    try:\n        from codex_cli_bin import bundled_codex_path\n    except ImportError as exc:\n        raise FileNotFoundError(\n            \"Unable to locate the pinned Codex runtime. Install the published SDK build \"\n            f\"with its {RUNTIME_PKG_NAME} dependency, or set CodexConfig.codex_bin \"\n            \"explicitly.\"\n        ) from exc\n\n    return bundled_codex_path()\n\n\ndef _installed_codex_path_dirs() -> tuple[Path, ...]:\n    try:\n        from codex_cli_bin import bundled_path_dir\n    except (ImportError, AttributeError):\n        return ()\n\n    path_dir = bundled_path_dir()\n    return (path_dir,) if path_dir is not None else ()\n\n","sourceCodeStart":97,"sourceCodeEnd":133,"githubUrl":"https://github.com/openai/codex/blob/339751715c64496cb86246bfb3935f40e309dd3d/sdk/python/src/openai_codex/client.py#L97-L133","documentation":"Error \"Unable to locate the pinned Codex runtime. Install the published SDK build with its {RUNTIME_PKG_NAME} dependency, or set CodexConfig.codex_bin explicitly.\" thrown in openai/codex.","triggerScenarios":"Thrown at sdk/python/src/openai_codex/client.py:115 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Reinstall the SDK with its pinned runtime dependency, or set CodexConfig.codex_bin to an explicit binary path."],"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"}