From 3725fe31ee49fd692bc7cc1131521c8f73227c5e Mon Sep 17 00:00:00 2001 From: Julian Lechner Date: Mon, 23 Nov 2026 09:05:24 +0100 Subject: [PATCH] fix(plugins): allow npm tarball fetches for plugin installs npm 12 changed the default of allow-remote to none. Claude installs npm plugin sources such as rea-agents from a registry tarball URL, so `claude plugin install rea@rea` failed with EALLOWREMOTE. The client commands now run with npm_config_allow_remote=all. root does not cover this case. The setting applies only to these child processes, and a value the user sets still takes precedence. Co-Authored-By: Claude Opus 5.5 --- scripts/lib/managed-extensions.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/scripts/lib/managed-extensions.py b/scripts/lib/managed-extensions.py index 277bc00..08dd261 100644 --- a/scripts/lib/managed-extensions.py +++ b/scripts/lib/managed-extensions.py @@ -83,6 +83,9 @@ def run_command(arguments, summary=False, home=None): if executable is None: raise ValueError(f'{arguments[0]} CLI is required to manage plugins.') environment = os.environ.copy() + # npm 12 defaults allow-remote to none, so Claude's install of an npm plugin source (a registry tarball URL) fails + # with EALLOWREMOTE. "root" is not enough there; "all" applies only to this child process, and a user value wins. + environment.setdefault('npm_config_allow_remote', 'all') if home is not None: environment.update(HOME=str(home), USERPROFILE=str(home), CODEX_HOME=str(home / '.codex'), CLAUDE_CONFIG_DIR=str(home / '.claude')) result = subprocess.run([executable, *arguments[1:]], stdin=subprocess.DEVNULL,