Repository navigation
Description
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
- Put an npm-compatible shim first on
PATH. The shim implements literal--prefixarguments but does not implement npm'snpm_config_prefixenvironment configuration. Bun-backed npm shims can have this shape. - Start T3 Code with that environment.
- Add an ACP Registry agent whose distribution is
npx, such asfactory-droid(droid@<exact-version>). - Let T3 prepare/install the agent.
A minimal shim reproduces the relevant contract mismatch without needing Factory specifically:
#!/bin/sh
# It understands --prefix <dir> / --prefix=<dir>, but intentionally ignores
# npm_config_prefix, matching the shim behavior that triggered this.
prefix=
for arg in "$@"; do
case "$arg" in
--prefix=*) prefix=${arg#--prefix=} ;;
esac
done
if [ "$1" = root ] && [ "$2" = --global ]; then
printf '%s\n' "${prefix:-$HOME/.bun/install/global/node_modules}"
exit 0
fi
if [ "$1" = prefix ] && [ "$2" = --global ]; then
printf '%s\n' "${prefix:-$HOME/.bun/install/global}"
exit 0
fi
if [ "$1" = install ] && [ "$2" = --global ]; then
# With only npm_config_prefix set, the package is not placed in T3's managed
# prefix even though the install command exits successfully.
exit 0
fi
exit 64The important part is that T3 currently communicates the managed install root only through npm_config_prefix:
but then runs the install without an explicit --prefix argument:
and discovers the result by asking the same npm executable for root --global and prefix --global:
Expected behavior
T3 should either:
- pass the managed prefix explicitly to npm install/query commands, or
- validate before/after installation that the npm executable honors the required prefix contract and fail with an actionable message naming the shim/configuration problem.
Ideally a failed provider install should also not leave T3 with a dangling default model selection for a provider instance that is no longer configured.
Actual behavior
The npm install command can exit successfully while the package is not installed into T3's managed prefix. Discovery then fails with:
ACP Registry installed [email protected], but could not resolve its global command.
On the affected machine, the managed install directories existed but were effectively empty:
~/.t3/tools/factory-droid/1.14.0/npm/
~/.t3/tools/factory-droid/1.16.0/npm/
~/.t3/tools/factory-droid/1.17.2/npm/
~/.t3/tools/factory-droid/1.18.0/npm/
T3's settings also had a default model selection pointing at acpRegistry_factory_droid, while providerInstances no longer contained that provider instance. I cannot prove the install failure alone caused that state loss, but the combination left Factory Droid unavailable in the orchestrator even though the standalone droid CLI was installed, authenticated, and completed ACP initialize handshakes successfully.
Devin's ACP Registry provider was unaffected because it uses a binary archive distribution; this only hits npm/npx-distributed registry agents.
Impact
Minor bug or occasional failure
Version or commit
T3 Code desktop 0.1.12-nightly.20261124.5209.
The same install/discovery flow is present on main in packages/provider-acp-registry/src/server/AcpRegistrySupport.ts as of filing.
Environment
- macOS arm64
- Desktop app with local server
npm --version:99.0.0-npm-shim (bun 1.4.5)- Factory Droid CLI
1.18.0installed independently and authenticated - ACP Registry
factory-droidversion observed:1.20.0, distributed as npx package[email protected]
Logs or stack traces
ACP Registry installed [email protected], but could not resolve its global command.
Workaround
Use an already-installed Factory Droid executable through the provider's command-path override, or repair the npm shim so it honors npm_config_prefix and returns npm-compatible global root/prefix/bin results.
In this case, configuring the registry provider as factory-droid with commandPath pointing at the existing droid executable restored orchestration immediately, while preserving the registry identity and icon.
Related issues
- [Bug]: Inherited NPM_CONFIG_PREFIX overrides the managed ACP npm prefix on Windows #38697 covered inherited uppercase
NPM_CONFIG_PREFIXoverriding the managed prefix on Windows. This is a different shim-contract failure mode. - [Bug]: managed npm ACP package can launch an unrelated PATH command #37541 covered managed npm package resolution falling through to an unrelated PATH command. This case fails earlier because the managed package layout is never created.
- [Bug]: ACP Registry npx installs fail when the pinned version is newer than npm's release-age policy #19855 covered npm release-age policy blocking exact ACP package pins.
Activity