paperclipai/paperclip · error

ACPX ${input.profile.agent} runtime omitted its verified pla

Error message

ACPX ${input.profile.agent} runtime omitted its verified platform executable package

What it means

After confirming the runtime profile matches a qualified package/version, the verifier checks that the runtime package's package.json declares the platform-specific executable package in optionalDependencies with the exact dependencyDeclaration recorded in the qualification table. If optionalDependencies is missing, malformed, or lacks the expected entry/version, the runtime is considered tampered or incorrectly assembled and verification aborts.

Source

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

    );
  }
  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
  ) {
    throw new Error(
      `ACPX ${input.profile.agent} runtime omitted its verified platform executable package`,
    );
  }

  const executablePackageJsonPath = await realpath(
    input.resolvePackageJson(
      qualification.packageName,
      input.runtimePackageJsonPath,
    ),
  );
  const executablePackage = await readPackageJson(
    executablePackageJsonPath,
    qualification.packageName,
  );
  if (executablePackage.version !== qualification.packageVersion) {
    throw new Error(
      `ACPX ${input.profile.agent} runtime executable package version mismatch: expected ${qualification.packageVersion}, received ${executablePackage.version ?? "unknown"}`,
    );

View on GitHub (pinned to 01ad858492)

Solutions

  1. Reinstall the ACPX runtime package cleanly from the official registry (delete node_modules entry + lockfile entry, then install) so optionalDependencies matches the published manifest.
  2. Ensure the profile's agentRuntimeVersion matches the actually installed runtime package version; a version/profile mismatch surfaces as altered declarations.
  3. Check for patch-package/pnpm patches or postinstall scripts modifying the runtime's package.json and remove/rebase them.
  4. Verify the package source (corporate mirror/proxy) is serving unmodified published tarballs.
  5. Confirm optionalDependencies resolution is not disabled (npm --omit=optional, pnpm optional=false).

Example fix

// before (runtime package.json, tampered)
"optionalDependencies": { "@paperclip/acpx-claude-linux-x64": "^1.0.0" }
// after (matches qualification.dependencyDeclaration)
"optionalDependencies": { "@paperclip/acpx-claude-linux-x64": "1.2.3" }
Defensive patterns

Strategy: validation

Validate before calling

const pkg = JSON.parse(fs.readFileSync(runtimePkgJsonPath, "utf8"));
const decl = pkg.optionalDependencies?.[platformPackageName];
if (decl !== expectedDeclaration) {
  throw new Error(`Runtime optionalDependencies['${platformPackageName}'] is '${decl ?? "missing"}', expected '${expectedDeclaration}'; reinstall the runtime package`);
}

Type guard

function hasQualifiedOptionalDependency(pkg: unknown, name: string, declaration: string): boolean {
  const od = (pkg as { optionalDependencies?: unknown })?.optionalDependencies;
  return typeof od === "object" && od !== null && !Array.isArray(od) &&
    (od as Record<string, unknown>)[name] === declaration;
}

Prevention

When it happens

Trigger: The resolved ACPX runtime package.json has no optionalDependencies object, has an array instead of a map, or its entry for qualification.packageName differs from the pinned declaration (wrong version range or replaced by a different specifier) — typically after hand-editing package.json, a partial/patched install, or a registry package that was rebuilt/republished with altered metadata.

Common situations: Manually pruning 'optional' deps with npm/yarn/pnpm prune or --omit=optional then editing metadata; a proxy/mirror serving a re-packed tarball; a monorepo patch (patch-package) rewriting the dependency spec; installing a different version of the runtime than the profile pins.

Understand the failure class

Background: "X is not installed. Please install it with pip install Y": missing optional dependency errors — ImportError/ValueError raised when a library's optional extra was never installed — this error's family across 22 libraries.

Related errors


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