{"record":{"id":"22361042f40f9a86","repo":"paperclipai/paperclip","slug":"acpx-claude-package-dependency-mismatch-for-expe","errorCode":null,"errorMessage":"ACPX claude package dependency mismatch for ${expected.packageName}","messagePattern":"ACPX claude package dependency mismatch for (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packages/paperclip-runner/src/drivers/acpx/installation-integrity.ts","lineNumber":615,"sourceCode":"    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      );\n      if (dependencyPackage.version !== expected.packageVersion) {\n        throw new Error(\n          `ACPX claude dependency package version mismatch for ${expected.packageName}: expected ${expected.packageVersion}, received ${dependencyPackage.version ?? \"unknown\"}`,\n        );\n      }\n      supplementalPackages.push({\n        directory: dirname(dependencyPackageJsonPath),\n        format: packageModuleFormat(dependencyPackage.type),","sourceCodeStart":597,"sourceCodeEnd":633,"githubUrl":"https://github.com/paperclipai/paperclip/blob/01ad8584922b5d85292b1723cae71fa0d9b07a19/packages/paperclip-runner/src/drivers/acpx/installation-integrity.ts#L597-L633","documentation":"Once a valid dependencies object exists, each entry in QUALIFIED_CLAUDE_PROVIDER_DEPENDENCIES must be declared with the exact string (dependencyDeclaration) recorded at qualification time. This error fires when a qualified package is declared with a different range/version than the qualified manifest, indicating the installed claude package's dependency graph diverged from the qualified baseline.","triggerScenarios":"verifyQualifiedAcpxInstallation with profile.agent === \"claude\" where serverPackage.dependencies[expected.packageName] !== expected.dependencyDeclaration for any qualified package — e.g. dependencies lists \"^2.0.0\" but qualification pinned \"2.0.14\", or the dependency was removed/renamed.","commonSituations":"Running npm/pnpm update that rewrote a pinned version to a caret range; upgrading the claude server package to a newer release that bumped a dependency; a lockfile-less install resolving a different version; manually editing package.json.","solutions":["Reinstall the exact qualified claude server package version so its dependency declarations match QUALIFIED_CLAUDE_PROVIDER_DEPENDENCIES byte-for-byte.","Restore the expected dependency declaration string in the server package's package.json to the qualified value.","If you intentionally upgraded, re-run the qualification flow to regenerate QUALIFIED_CLAUDE_PROVIDER_DEPENDENCIES for the new versions (do not bypass the check).","Use a committed lockfile and install with frozen lockfile so resolved declarations stay identical to qualification time."],"exampleFix":"// before (server package.json dependencies)\n\"@anthropic-ai/claude-code\": \"^2.0.0\"\n// after\n\"@anthropic-ai/claude-code\": \"2.0.14\"","handlingStrategy":"validation","validationCode":"for (const expected of QUALIFIED_CLAUDE_PROVIDER_DEPENDENCIES) {\n  const actual = serverPackage.dependencies?.[expected.packageName];\n  if (actual !== expected.dependencyDeclaration) {\n    throw new Error(`pre-check: ${expected.packageName} declared as ${actual}, qualified as ${expected.dependencyDeclaration}`);\n  }\n}","typeGuard":"const declarationMatches = (pkg, expected) =>\n  pkg?.dependencies?.[expected.packageName] === expected.dependencyDeclaration;","tryCatchPattern":"try {\n  await verifyQualifiedAcpxInstallation(input);\n} catch (e) {\n  const m = e.message.match(/dependency mismatch for (.+)$/);\n  if (m) {\n    await reinstallPackageAt(m[1], qualifiedVersionOf(m[1]));\n  } else throw e;\n}","preventionTips":["Pin qualified dependencies to exact versions (no ^ or ~ ranges) in the server package.","Commit the lockfile and forbid dependency-bump PRs that touch qualified packages without re-qualification.","Run the verification pre-check in CI before deploying the install tree."],"tags":["installation-integrity","acpx","dependency-pinning","version-mismatch"],"backgroundTag":"invalid-argument-value","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"}