paperclipai/paperclip · error · Error

Codex ACP must share the image's Codex installation

Error message

Codex ACP must share the image's Codex installation

What it means

Supply-chain guard in build-provider-pack.mjs: after pnpm deploy, the @agentclient Codex ACP bridge resolves @openai/codex to a different real path than the runner pack's own @openai/codex dependency. The build fails because a duplicate/deduplicated older or private Codex CLI slipped into the pack via the bridge instead of sharing the image's pinned installation.

Source

Thrown at packages/paperclip-runner/scripts/build-provider-pack.mjs:138

      "--filter",
      "@paperclipai/paperclip-runner",
      "deploy",
      "--prod",
      temporaryRoot,
    ],
    { cwd: workspaceRoot, encoding: "utf8", stdio: "inherit" },
  );
  if (deployed.status !== 0) {
    throw new Error(`pnpm deploy failed with exit code ${deployed.status}`);
  }

  // Fail the image build if a bridge silently brings back an older/private
  // provider CLI. A direct dependency alone does not deduplicate pnpm's graph.
  const packRequire = createRequire(join(temporaryRoot, "package.json"));
  const codexAcpRequire = createRequire(packRequire.resolve("@agentclientprotocol/codex-acp/package.json"));
  if (realpathSync(codexAcpRequire.resolve("@openai/codex/package.json")) !==
      realpathSync(packRequire.resolve("@openai/codex/package.json"))) {
    throw new Error("Codex ACP must share the image's Codex installation");
  }

  // Reuse the already-qualified build interpreter instead of introducing a
  // package-manager lifecycle hook or a second binary supply chain. The pack
  // manifest binds the copied bytes, platform, architecture, and minimum
  // version before any provider is launched.
  const minimumNodeVersion = [24, 11, 0];
  const actualNodeVersion = process.versions.node.split(".").map(Number);
  if (
    actualNodeVersion[0] < minimumNodeVersion[0] ||
    (actualNodeVersion[0] === minimumNodeVersion[0] &&
      (actualNodeVersion[1] < minimumNodeVersion[1] ||
        (actualNodeVersion[1] === minimumNodeVersion[1] &&
          actualNodeVersion[2] < minimumNodeVersion[2])))
  ) {
    throw new Error("Provider pack build Node is older than 24.11.0");
  }
  const stableNodeRoot = join(temporaryRoot, "node_modules", "node");

View on GitHub (pinned to 01ad858492)

Solutions

  1. Pin the bridge's @openai/codex to the same version as the runner dependency so pnpm deduplicates to one instance
  2. Add a pnpm override for @openai/codex at the workspace root
  3. Update @agentclient/* bridge to a version compatible with the image's Codex version
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at packages/paperclip-runner/scripts/build-provider-pack.mjs:138 when the library encounters an invalid state.

Common situations: See trigger scenarios.


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