paperclipai/paperclip · error
ACPX claude package dependency mismatch for ${expected.packa
Error message
ACPX claude package dependency mismatch for ${expected.packageName} What it means
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.
Source
Thrown at packages/paperclip-runner/src/drivers/acpx/installation-integrity.ts:615
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,
);
if (dependencyPackage.version !== expected.packageVersion) {
throw new Error(
`ACPX claude dependency package version mismatch for ${expected.packageName}: expected ${expected.packageVersion}, received ${dependencyPackage.version ?? "unknown"}`,
);
}
supplementalPackages.push({
directory: dirname(dependencyPackageJsonPath),
format: packageModuleFormat(dependencyPackage.type),View on GitHub (pinned to 01ad858492)
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.
Example fix
// before (server package.json dependencies) "@anthropic-ai/claude-code": "^2.0.0" // after "@anthropic-ai/claude-code": "2.0.14"
Defensive patterns
Strategy: validation
Validate before calling
for (const expected of QUALIFIED_CLAUDE_PROVIDER_DEPENDENCIES) {
const actual = serverPackage.dependencies?.[expected.packageName];
if (actual !== expected.dependencyDeclaration) {
throw new Error(`pre-check: ${expected.packageName} declared as ${actual}, qualified as ${expected.dependencyDeclaration}`);
}
} Type guard
const declarationMatches = (pkg, expected) => pkg?.dependencies?.[expected.packageName] === expected.dependencyDeclaration;
Try / catch
try {
await verifyQualifiedAcpxInstallation(input);
} catch (e) {
const m = e.message.match(/dependency mismatch for (.+)$/);
if (m) {
await reinstallPackageAt(m[1], qualifiedVersionOf(m[1]));
} else throw e;
} Prevention
- 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.
When it happens
Trigger: 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.
Common situations: 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.
Understand the failure class
Background: "Must be a positive integer", "Invalid value", "Unsupported": the invalid-argument-value error family, when a library rejects the value you pass — this error's family across 35 libraries.
Related errors
- ACPX claude dependency package version mismatch for ${expect
- ACPX ${input.profile.agent} runtime does not match its quali
- ACPX runtime does not expose extension requests
- Qualified ACPX runtime version omitted its package
- ACPX claude package omitted its qualified dependencies
AI-assisted analysis of paperclipai/paperclip@01ad858492 (2026-09-10).
Data as JSON: /api/errors/22361042f40f9a86.
Report an issue: GitHub.