Skip to content

[Bug]: managed npm ACP package can launch an unrelated PATH command #37541

Closed

Description

@StiensWout

Before submitting

  • I searched existing issues and did not find a duplicate.
  • I included enough detail to reproduce or investigate the problem.

Area

apps/server

Steps to reproduce

  1. Configure an ACP Registry agent distributed as an npm package with an exposed command, and put an unrelated command of the same name on the server user's PATH.
  2. Install the package into T3's managed npm prefix with npm's ordinary bin-links=false setting, or remove its managed executable link after installation. The package manifest remains installed.
  3. Resolve or start the registry agent again.

An isolated real npm producer reproduced the manifest-without-link state using npm install --global --prefix <isolated-prefix> --bin-links=false --ignore-scripts --no-audit --no-fund <local-package.tgz>. No live installation was touched.

Expected behavior

Repair the managed executable or return install_failed. A registry-managed package must resolve its own executable.

Actual behavior

AcpRegistrySupport searches the managed bin directory plus inherited PATH and returns the unrelated same-name command. Starting the agent can therefore launch the wrong version or a non-ACP CLI. This repeats whenever the managed executable is absent and a same-name user command exists.

Impact

Major degradation or frequent failure

Version or commit

Reproduced on main @ 506a043 (also f8c8f30), originally confirmed on 39e269a.

Environment

Linux server, npm-managed ACP Registry provider.

Logs or stack traces

The public resolver test expected tools/npm/bin/example-agent but received user-bin/example-agent when the managed link was missing.

Screenshots, recordings, or supporting files

Found in the Pi and ACP Improvements hunt and independently reproduced by Claude Opus 5.5. The fix PR includes the deterministic public resolver regression test.

Workaround

Restore bin links in the managed npm installation and disable the npm setting that suppresses them.

Activity

  1. added
    vouch:trusted
    on Nov 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    vouch:trusted

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions