{"record":{"id":"90ed169949f0d9dc","repo":"github/copilot-sdk","slug":"unsupported-copilot-cli-architecture-arch","errorCode":null,"errorMessage":"Unsupported Copilot CLI architecture: ${arch}.","messagePattern":"Unsupported Copilot CLI architecture: (.+?)\\.","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"nodejs/src/runtimeArtifacts.ts","lineNumber":224,"sourceCode":"}\n\nfunction isMusl(): boolean {\n    if (process.platform !== \"linux\") {\n        return false;\n    }\n    const report = process.report?.getReport() as\n        | { header?: { glibcVersionRuntime?: string } }\n        | undefined;\n    return report?.header?.glibcVersionRuntime === undefined;\n}\n\nexport function getRuntimePlatform(\n    platform = process.platform,\n    arch = process.arch,\n    musl = isMusl()\n): string {\n    if (arch !== \"x64\" && arch !== \"arm64\") {\n        throw new Error(`Unsupported Copilot CLI architecture: ${arch}.`);\n    }\n    if (platform === \"linux\") {\n        return `${musl ? \"linuxmusl\" : \"linux\"}-${arch}`;\n    }\n    if (platform === \"darwin\" || platform === \"win32\") {\n        return `${platform}-${arch}`;\n    }\n    throw new Error(`Unsupported Copilot CLI platform: ${platform}-${arch}.`);\n}\n\nexport function getRuntimeReleaseAssetName(version: string, platform: string): string {\n    return `github-copilot-${version}-${platform}.tgz`;\n}\n\nexport function getRuntimePackageName(platform: string): string {\n    return `@github/copilot-sdk-${platform}`;\n}\n","sourceCodeStart":206,"sourceCodeEnd":242,"githubUrl":"https://github.com/github/copilot-sdk/blob/cd8cf15dc3f9e762615790aaed0a771a0f392755/nodejs/src/runtimeArtifacts.ts#L206-L242","documentation":"getRuntimePlatform maps process.platform/process.arch to a runtime platform triple and only supports x64 and arm64 architectures. Any other arch (e.g. arm, ppc64, s390x, 32-bit x86) is rejected with this error because no prebuilt Copilot CLI runtime exists for it.","triggerScenarios":"Running the SDK on hardware/Node builds whose process.arch is not 'x64' or 'arm64' — e.g. Raspberry Pi 32-bit (arm), IBM POWER (ppc64), z/OS mainframe (s390x), or ia32 Node.","commonSituations":"ARM 32-bit boards, Alpine on odd architectures, running x86 Node under emulation configs misreporting arch, corporate hardware not covered by prebuilt binaries.","solutions":["Run under a 64-bit OS with an x64 or arm64 Node build.","Use an officially supported machine/container image (linux/darwin/win32 on x64/arm64).","If emulating, ensure Node reports x64 or arm64 (check process.arch).","File/await an upstream request for prebuilt binaries on the target arch; there is no source-build fallback."],"exampleFix":"// before\n$ node -p process.arch\narm\n\n// after\n# install 64-bit OS and arm64 Node\n$ node -p process.arch\narm64","handlingStrategy":"validation","validationCode":"const SUPPORTED_ARCH = new Set(['x64', 'arm64']);\nif (!SUPPORTED_ARCH.has(process.arch)) throw new Error(`unsupported arch: ${process.arch}`);","typeGuard":"function isSupportedArch(arch: string): arch is 'x64' | 'arm64' { return arch === 'x64' || arch === 'arm64'; }","tryCatchPattern":"try {\n  const platform = getRuntimePlatform();\n} catch (e) {\n  if (e.message.startsWith('Unsupported Copilot CLI architecture')) {\n    // fail fast with a clear environment requirement message\n  } else throw e;\n}","preventionTips":["Pin CI/dev containers to x64 or arm64 Node images.","Check process.arch early at startup and surface a clear requirement.","Avoid 32-bit Node builds for the SDK host process."],"tags":["platform","architecture","unsupported","nodejs"],"backgroundTag":"unsupported-platform","analyzedSha":"cd8cf15dc3f9e762615790aaed0a771a0f392755","analyzedAt":"2026-09-09T18:32:31.973Z","contentChangedAt":"2026-09-09T18:32:31.973Z","schemaVersion":2},"datasetVersion":"2026-09-15T23:17:13.987Z"}