{"record":{"id":"09a0c43ed5c2ee1e","repo":"paperclipai/paperclip","slug":"acpx-claude-package-omitted-its-qualified-dependen","errorCode":null,"errorMessage":"ACPX claude package omitted its qualified dependencies","messagePattern":"ACPX claude package omitted its qualified dependencies","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packages/paperclip-runner/src/drivers/acpx/installation-integrity.ts","lineNumber":607,"sourceCode":"      runtimePackageJsonPath,\n      resolvePackageJson,\n    });\n  } else if (profile.agentRuntimeVersion !== null) {\n    throw new Error(\"Qualified ACPX runtime version omitted its package\");\n  }\n\n  const supplementalPackages: Array<{\n    directory: string;\n    format: AcpxCommandFormat;\n  }> = [];\n  if (profile.agent === \"claude\") {\n    const declaredDependencies = serverPackage.dependencies;\n    if (\n      typeof declaredDependencies !== \"object\" ||\n      declaredDependencies === null ||\n      Array.isArray(declaredDependencies)\n    ) {\n      throw new Error(\"ACPX claude package omitted its qualified dependencies\");\n    }\n    for (const expected of QUALIFIED_CLAUDE_PROVIDER_DEPENDENCIES) {\n      if (\n        (declaredDependencies as Record<string, unknown>)[\n          expected.packageName\n        ] !== expected.dependencyDeclaration\n      ) {\n        throw new Error(\n          `ACPX claude package dependency mismatch for ${expected.packageName}`,\n        );\n      }\n      const dependencyPackageJsonPath = await realpath(\n        resolvePackageJson(expected.packageName, serverPackageJsonPath),\n      );\n      const dependencyPackage = await readPackageJson(\n        dependencyPackageJsonPath,\n        expected.packageName,\n      );","sourceCodeStart":589,"sourceCodeEnd":625,"githubUrl":"https://github.com/paperclipai/paperclip/blob/01ad8584922b5d85292b1723cae71fa0d9b07a19/packages/paperclip-runner/src/drivers/acpx/installation-integrity.ts#L589-L625","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","solutions":["Reinstall the qualified claude ACPX server package at the exact qualified version so its package.json includes the dependencies object.","Inspect the package.json at agentServerPackageJsonPath and restore the missing dependencies field with the exact qualified declarations.","Verify resolvePackageJson resolved the intended qualified package, not a different or hoisted copy lacking metadata.","Disable any post-install stripping/pruning (e.g. --omit flags, module optimizers) that removes the dependencies field."],"exampleFix":"// before (server package.json)\n{ \"name\": \"acpx-claude-server\", \"version\": \"1.0.0\" }\n// after\n{ \"name\": \"acpx-claude-server\", \"version\": \"1.0.0\", \"dependencies\": { \"@anthropic-ai/claude-code\": \"2.0.14\" } }","handlingStrategy":"validation","validationCode":"const pkg = JSON.parse(fs.readFileSync(serverPkgJsonPath, \"utf8\"));\nif (!pkg.dependencies || Array.isArray(pkg.dependencies) || typeof pkg.dependencies !== \"object\") {\n  throw new Error(\"server package missing dependencies object before verification\");\n}","typeGuard":"function hasDependenciesObject(pkg) {\n  return typeof pkg === \"object\" && pkg !== null && !Array.isArray(pkg) &&\n    typeof pkg.dependencies === \"object\" && pkg.dependencies !== null && !Array.isArray(pkg.dependencies);\n}","tryCatchPattern":"try {\n  await verifyQualifiedAcpxInstallation(input);\n} catch (e) {\n  if (e.message === \"ACPX claude package omitted its qualified dependencies\") {\n    await reinstallQualifiedServerPackage();\n    await verifyQualifiedAcpxInstallation(input); // retry once after clean reinstall\n  } else throw e;\n}","preventionTips":["Install with frozen lockfiles (npm ci / pnpm install --frozen-lockfile).","Avoid post-install pruning/optimizers on the ACPX install tree.","Verify package.json integrity of the qualified package after every install step."],"tags":["installation-integrity","acpx","package-json","dependency-validation"],"backgroundTag":"missing-dependency","analyzedSha":"01ad8584922b5d85292b1723cae71fa0d9b07a19","analyzedAt":"2026-09-10T03:14:50.855Z","contentChangedAt":"2026-09-10T03:14:50.855Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}