openai/codex · error · Error
Unsupported target triple: ${targetTriple}
Error message
Unsupported target triple: ${targetTriple} What it means
Error "Unsupported target triple: ${targetTriple}" thrown in openai/codex.
Source
Thrown at sdk/typescript/src/exec.ts:401
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.`,
);
}
const codexBinaryName = process.platform === "win32" ? "codex.exe" : "codex";
const nativePackage = resolveNativePackage(vendorRoot, targetTriple, codexBinaryName);
if (!nativePackage) {
throw new Error(View on GitHub (pinned to 339751715c)
Solutions
- Use a supported Rust target triple for the packaged Codex binaries.
When it happens
Trigger: Thrown at sdk/typescript/src/exec.ts:401 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/c22a46495d0d9ec8.
Report an issue: GitHub.