paperclipai/paperclip · error

ACPX ${input.profile.agent} runtime does not match its quali

Error message

ACPX ${input.profile.agent} runtime does not match its qualified profile

What it means

verifyQualifiedRuntimeExecutable resolves a platform-specific runtime qualification and checks it against the profile: the resolved runtime package name and version must equal profile.agentRuntimePackage and profile.agentRuntimeVersion. A mismatch means the qualified runtime binary shipped/resolved for this platform differs from what the profile pinned, so verification refuses to proceed.

Source

Thrown at packages/paperclip-runner/src/drivers/acpx/installation-integrity.ts:849

  profile: QualifiedAcpxProfile;
  runtimePackage: AcpxPackageMetadata;
  runtimePackageJsonPath: string;
  resolvePackageJson: AcpxPackageJsonResolver;
}): Promise<VerifiedAcpxRuntimeExecutable | null> {
  const qualification =
    input.profile.agent === "claude"
      ? process.platform === "darwin" && (process.arch === "arm64" || process.arch === "x64")
        ? QUALIFIED_CLAUDE_DARWIN_RUNTIMES[process.arch]
        : QUALIFIED_CLAUDE_LINUX_X64_RUNTIME
      : input.profile.agent === "codex"
        ? QUALIFIED_CODEX_LINUX_X64_RUNTIME
        : null;
  if (qualification === null) return null;
  if (
    input.profile.agentRuntimePackage !== qualification.runtimePackageName ||
    input.profile.agentRuntimeVersion !== qualification.runtimePackageVersion
  ) {
    throw new Error(
      `ACPX ${input.profile.agent} runtime does not match its qualified profile`,
    );
  }
  if (!((process.platform === "linux" && process.arch === "x64")
    || (input.profile.agent === "claude" && process.platform === "darwin" && (process.arch === "arm64" || process.arch === "x64")))) {
    throw new Error(
      `ACPX ${input.profile.agent} verified runtime executable is unavailable for ${process.platform} ${process.arch}`,
    );
  }

  const optionalDependencies = input.runtimePackage.optionalDependencies;
  if (
    typeof optionalDependencies !== "object" ||
    optionalDependencies === null ||
    Array.isArray(optionalDependencies) ||
    (optionalDependencies as Record<string, unknown>)[
      qualification.packageName
    ] !== qualification.dependencyDeclaration

View on GitHub (pinned to 01ad858492)

Solutions

  1. Re-run the qualification/installation flow so profile.agentRuntimePackage/Version are regenerated to match the currently resolved runtime.
  2. Align the installed runtime version with the profile: install the exact qualified runtime package version (npm ci / pnpm install --frozen-lockfile).
  3. Clear stale qualified-profile caches and rebuild the profile from the current install.
  4. If a platform-specific variant resolved unexpectedly, check resolvePackageJson resolution order and remove duplicate runtime copies.

Example fix

// before (profile pinned old runtime, node_modules upgraded)
agentRuntimePackage: "@zed-industries/claude-code-acp", agentRuntimeVersion: "2.0.14" // installed: 2.1.0
// after
$ npm ci   # restore 2.0.14, or re-qualify the profile against 2.1.0
Defensive patterns

Strategy: validation

Validate before calling

const resolved = JSON.parse(fs.readFileSync(require.resolve(profile.agentRuntimePackage + "/package.json"), "utf8"));
if (resolved.version !== profile.agentRuntimeVersion) {
  throw new Error(`runtime resolved ${resolved.version} but profile pins ${profile.agentRuntimeVersion}; re-qualify or reinstall`);
}

Type guard

const profileMatchesResolved = (profile, qualification) =>
  qualification !== null &&
  qualification.runtimePackageName === profile.agentRuntimePackage &&
  qualification.runtimePackageVersion === profile.agentRuntimeVersion;

Try / catch

try {
  await verifyQualifiedAcpxInstallation(input);
} catch (e) {
  if (/runtime does not match its qualified profile/.test(e.message)) {
    execSync("npm ci"); // or regenerate the qualified profile against the installed runtime
    await verifyQualifiedAcpxInstallation(input);
  } else throw e;
}

Prevention

When it happens

Trigger: verifyQualifiedAcpxInstallation -> verifyQualifiedRuntimeExecutable where the resolved qualification is non-null but qualification.runtimePackageName !== input.profile.agentRuntimePackage or qualification.runtimePackageVersion !== input.profile.agentRuntimeVersion — e.g. the bundled runtime was upgraded independently of the qualified profile.

Common situations: Upgrading the runtime dependency (new version in node_modules) without regenerating the qualified profile; multiple platform variants installed and the wrong one resolved; a stale qualified-profile cache referencing an older package name or version; monorepo dependency bumps changing the resolved runtime.

Related errors


AI-assisted analysis of paperclipai/paperclip@01ad858492 (2026-09-10). Data as JSON: /api/errors/0e5bd734491c633e. Report an issue: GitHub.