paperclipai/paperclip · error

ACPX claude package omitted its qualified dependencies

Error message

ACPX claude package omitted its qualified dependencies

What it means

For the 'claude' agent, verifyQualifiedAcpxInstallation requires the ACPX server package's package.json to carry a valid dependencies object listing the qualified provider dependencies (QUALIFIED_CLAUDE_PROVIDER_DEPENDENCIES). This error is thrown when serverPackage.dependencies is missing, null, or an array instead of a plain object, meaning the installed claude package does not look like the qualified build.

Source

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

      runtimePackageJsonPath,
      resolvePackageJson,
    });
  } else if (profile.agentRuntimeVersion !== null) {
    throw new Error("Qualified ACPX runtime version omitted its package");
  }

  const supplementalPackages: Array<{
    directory: string;
    format: AcpxCommandFormat;
  }> = [];
  if (profile.agent === "claude") {
    const declaredDependencies = serverPackage.dependencies;
    if (
      typeof declaredDependencies !== "object" ||
      declaredDependencies === null ||
      Array.isArray(declaredDependencies)
    ) {
      throw new Error("ACPX claude package omitted its qualified dependencies");
    }
    for (const expected of QUALIFIED_CLAUDE_PROVIDER_DEPENDENCIES) {
      if (
        (declaredDependencies as Record<string, unknown>)[
          expected.packageName
        ] !== expected.dependencyDeclaration
      ) {
        throw new Error(
          `ACPX claude package dependency mismatch for ${expected.packageName}`,
        );
      }
      const dependencyPackageJsonPath = await realpath(
        resolvePackageJson(expected.packageName, serverPackageJsonPath),
      );
      const dependencyPackage = await readPackageJson(
        dependencyPackageJsonPath,
        expected.packageName,
      );

View on GitHub (pinned to 01ad858492)

Solutions

  1. Reinstall the qualified claude ACPX server package at the exact qualified version so its package.json includes the dependencies object.
  2. Inspect the package.json at agentServerPackageJsonPath and restore the missing dependencies field with the exact qualified declarations.
  3. Verify resolvePackageJson resolved the intended qualified package, not a different or hoisted copy lacking metadata.
  4. Disable any post-install stripping/pruning (e.g. --omit flags, module optimizers) that removes the dependencies field.

Example fix

// before (server package.json)
{ "name": "acpx-claude-server", "version": "1.0.0" }
// after
{ "name": "acpx-claude-server", "version": "1.0.0", "dependencies": { "@anthropic-ai/claude-code": "2.0.14" } }
Defensive patterns

Strategy: validation

Validate before calling

const pkg = JSON.parse(fs.readFileSync(serverPkgJsonPath, "utf8"));
if (!pkg.dependencies || Array.isArray(pkg.dependencies) || typeof pkg.dependencies !== "object") {
  throw new Error("server package missing dependencies object before verification");
}

Type guard

function hasDependenciesObject(pkg) {
  return typeof pkg === "object" && pkg !== null && !Array.isArray(pkg) &&
    typeof pkg.dependencies === "object" && pkg.dependencies !== null && !Array.isArray(pkg.dependencies);
}

Try / catch

try {
  await verifyQualifiedAcpxInstallation(input);
} catch (e) {
  if (e.message === "ACPX claude package omitted its qualified dependencies") {
    await reinstallQualifiedServerPackage();
    await verifyQualifiedAcpxInstallation(input); // retry once after clean reinstall
  } else throw e;
}

Prevention

When it happens

Trigger: verifyQualifiedAcpxInstallation with profile.agent === "claude" reads serverPackage.dependencies and finds it is not a plain object — e.g. package.json parsed from a package that has no dependencies field, or a dependencies field serialized as an array.

Common situations: A hand-rolled or stripped package.json (dependency pruned by an aggressive installer/optimizer); a corrupted or partially written node_modules entry; installing a different package than the one that was qualified (e.g. a minimal shim named like the qualified one); pnpm/npm installs that removed optional metadata.

Understand the failure class

Background: "not installed", "pip install", "required for": how missing-dependency errors surface across open-source libraries — this error's family across 34 libraries.

Related errors


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