openai/codex · error · Error
Unsupported platform: ${platform} (${arch})
Error message
Unsupported platform: ${platform} (${arch}) What it means
Error "Unsupported platform: ${platform} (${arch})" thrown in openai/codex.
Source
Thrown at sdk/typescript/src/exec.ts:396
break;
case "win32":
switch (arch) {
case "x64":
targetTriple = "x86_64-pc-windows-msvc";
break;
case "arm64":
targetTriple = "aarch64-pc-windows-msvc";
break;
default:
break;
}
break;
default:
break;
}
if (!targetTriple) {
throw new Error(`Unsupported platform: ${platform} (${arch})`);
}
const platformPackage = PLATFORM_PACKAGE_BY_TARGET[targetTriple];
if (!platformPackage) {
throw new Error(`Unsupported target triple: ${targetTriple}`);
}
let vendorRoot: string;
try {
const codexPackageJsonPath = moduleRequire.resolve(`${CODEX_NPM_NAME}/package.json`);
const codexRequire = createRequire(codexPackageJsonPath);
const platformPackageJsonPath = codexRequire.resolve(`${platformPackage}/package.json`);
vendorRoot = path.join(path.dirname(platformPackageJsonPath), "vendor");
} catch {
throw new Error(
`Unable to locate Codex CLI binaries. Ensure ${CODEX_NPM_NAME} is installed with optional dependencies.`,
);
}View on GitHub (pinned to 339751715c)
Solutions
- Run on a supported platform and architecture combination, or install a build that ships binaries for this platform.
When it happens
Trigger: Thrown at sdk/typescript/src/exec.ts:396 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/5f641a3987ad7ac0.
Report an issue: GitHub.