{"record":{"id":"1e87adf3490dd03d","repo":"paperclipai/paperclip","slug":"acpx-input-profile-agent-verified-runtime-execu","errorCode":null,"errorMessage":"ACPX ${input.profile.agent} verified runtime executable is unavailable for ${process.platform} ${process.arch}","messagePattern":"ACPX (.+?) verified runtime executable is unavailable for (.+?) (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packages/paperclip-runner/src/drivers/acpx/installation-integrity.ts","lineNumber":855,"sourceCode":"    input.profile.agent === \"claude\"\n      ? process.platform === \"darwin\" && (process.arch === \"arm64\" || process.arch === \"x64\")\n        ? QUALIFIED_CLAUDE_DARWIN_RUNTIMES[process.arch]\n        : QUALIFIED_CLAUDE_LINUX_X64_RUNTIME\n      : input.profile.agent === \"codex\"\n        ? QUALIFIED_CODEX_LINUX_X64_RUNTIME\n        : null;\n  if (qualification === null) return null;\n  if (\n    input.profile.agentRuntimePackage !== qualification.runtimePackageName ||\n    input.profile.agentRuntimeVersion !== qualification.runtimePackageVersion\n  ) {\n    throw new Error(\n      `ACPX ${input.profile.agent} runtime does not match its qualified profile`,\n    );\n  }\n  if (!((process.platform === \"linux\" && process.arch === \"x64\")\n    || (input.profile.agent === \"claude\" && process.platform === \"darwin\" && (process.arch === \"arm64\" || process.arch === \"x64\")))) {\n    throw new Error(\n      `ACPX ${input.profile.agent} verified runtime executable is unavailable for ${process.platform} ${process.arch}`,\n    );\n  }\n\n  const optionalDependencies = input.runtimePackage.optionalDependencies;\n  if (\n    typeof optionalDependencies !== \"object\" ||\n    optionalDependencies === null ||\n    Array.isArray(optionalDependencies) ||\n    (optionalDependencies as Record<string, unknown>)[\n      qualification.packageName\n    ] !== qualification.dependencyDeclaration\n  ) {\n    throw new Error(\n      `ACPX ${input.profile.agent} runtime omitted its verified platform executable package`,\n    );\n  }\n","sourceCodeStart":837,"sourceCodeEnd":873,"githubUrl":"https://github.com/paperclipai/paperclip/blob/01ad8584922b5d85292b1723cae71fa0d9b07a19/packages/paperclip-runner/src/drivers/acpx/installation-integrity.ts#L837-L873","documentation":"verifyQualifiedRuntimeExecutable is a security/integrity gate that only permits the ACPX runtime binary on platform/arch combinations the project has actually qualified and hash-pinned (linux/x64 for any agent, plus darwin arm64/x64 for claude). When the configured profile names a qualified runtime package and version but the current process is running on an unqualified platform/arch, the check deliberately refuses to proceed instead of executing an unverified binary.","triggerScenarios":"Running on any platform/arch outside {linux/x64} or {claude on darwin arm64|x64} — e.g. win32, linux/arm64 (Apple Silicon Docker on ARM hosts, Raspberry Pi, Graviton), darwin for codex, or freebsd — while the agent profile (profile.agent, agentRuntimePackage, agentRuntimeVersion) matches a qualified profile so verification is attempted at all.","commonSituations":"Deploying Paperclip into an ARM Linux container or ARM CI runner; running on macOS with the codex agent (only claude is qualified on darwin); Windows development machines; someone added a qualified runtime entry without extending the platform allowlist.","solutions":["Run the ACPX runner on a qualified combination: linux x64 (any agent) or macOS arm64/x64 (claude only).","If on ARM Linux or Windows, run under an x64 emulation layer (e.g. x86_64 container via Rosetta/QEMU) or a qualified x64 host.","Verify the profile truly intends the qualified runtime; if a custom/local runtime is desired, route through the non-qualified path (qualification returns null) rather than a qualified profile name.","Check process.platform/process.arch at startup and fail fast with a clear deployment-level message instead of reaching this deep integrity check.","If a new platform genuinely should be supported, extend both the qualification map and this allowlist together with pinned digests upstream in the repo."],"exampleFix":"// before (linux/arm64 host)\nconst profile = { agent: \"codex\", agentRuntimePackage: \"@paperclip/acpx-codex-linux-x64\", agentRuntimeVersion: \"1.2.0\" };\n// after: run in an x64 container\n// docker run --platform linux/amd64 paperclip ...","handlingStrategy":"validation","validationCode":"const SUPPORTED = (agent) =>\n  (process.platform === \"linux\" && process.arch === \"x64\") ||\n  (agent === \"claude\" && process.platform === \"darwin\" && [\"arm64\", \"x64\"].includes(process.arch));\nif (!SUPPORTED(profile.agent)) {\n  throw new Error(`ACPX agent '${profile.agent}' not qualified for ${process.platform} ${process.arch}; use linux/x64 or claude on macOS`);\n}","typeGuard":"function isQualifiedPlatform(agent: string): boolean {\n  return (process.platform === \"linux\" && process.arch === \"x64\") ||\n    (agent === \"claude\" && process.platform === \"darwin\" && (process.arch === \"arm64\" || process.arch === \"x64\"));\n}","tryCatchPattern":null,"preventionTips":["Check process.platform/process.arch at deployment startup and refuse to configure ACPX agents on unqualified targets.","Pin runner images to linux/amd64 (or native macOS for claude) in Docker/CI configs.","Gate the codex agent to Linux x64 hosts only in provisioning scripts.","Log platform info in health checks so mismatches are visible before the integrity check fires."],"tags":["platform","runtime-verification","security","acpx"],"backgroundTag":"unsupported-platform","analyzedSha":"01ad8584922b5d85292b1723cae71fa0d9b07a19","analyzedAt":"2026-09-10T03:14:50.855Z","contentChangedAt":"2026-09-10T03:14:50.855Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}