You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Bug]: Inherited NPM_CONFIG_PREFIX overrides the managed ACP npm prefix on Windows #38697
I searched existing issues and did not find a duplicate.
I included enough detail to reproduce or investigate the problem.
Area
apps/server (ACP Registry)
Steps to reproduce
On Windows, set $env:NPM_CONFIG_PREFIX = 'C:\example\inherited-npm' in PowerShell, then launch T3 Code from that shell.
Add an npm-distributed ACP Registry agent whose exact package version is available. The managed npm commands in AcpRegistrySupport.ts copy the inherited environment and add a lowercase npm_config_prefix.
To verify the collision without installing anything, save this as repro.cjs and run node repro.cjs from the same shell. Replace the npm CLI path if Node.js is installed elsewhere.
T3's npm subprocesses use the managed prefix, regardless of how the inherited prefix variable is capitalized.
Actual behavior
I verified the following output on Windows:
Both spellings: C:\example\inherited-npm
Managed spelling only: C:\example\t3-managed
On Windows, Node passes only one of the case-insensitive duplicate environment keys to the child process. The inherited uppercase key wins here, so the managed npm commands can target a user or system prefix instead of T3's per-agent directory. The subprocess repro does not require network access or modify any packages.
Impact
Major degradation or frequent failure when an uppercase npm prefix is set.
Version or commit
T3 Code Beta 0.1.10 (7d32075). I also checked that the same environment merge is present on main.
Environment
Windows 11 x64, Node.js 26.13.1, npm 11.20.0.
Workaround
Remove NPM_CONFIG_PREFIX from the environment used to launch T3 Code if it is not needed there. T3 can avoid the collision by removing all inherited spellings of that key from the copied Windows environment before setting the managed prefix.
Activity
test(acp-registry): inherited NPM_CONFIG_PREFIX overrides the managed…
test(acp-registry): Windows npm commands get only the managed prefix