New features / v2.1.271
--accept-command for plugin installs
CHANGELOG · original
Added --accept-command <sha256> to claude plugin install and claude plugin update to accept exactly the command a previous --json run displayed, instead of -y Open official changelog ↗ Documentation
Documentation excerpt
How users accept the command
Claude Code runs your command on the user's machine, so it binds every run to the user's explicit acceptance:
- When users install the plugin from its details screen in
/plugin, or install or update it withclaude plugin installorclaude plugin updatein an interactive terminal, Claude Code shows them the exact command string first and records the accepted command for that installation. Aclaude plugin updatethat can proceed on the recorded acceptance of the same command shows nothing. - In a non-interactive shell, such as a provisioning script, pass
--yestoclaude plugin installorclaude plugin updateto accept the command it prints. To accept only the command that a previous--jsonrun displayed, pass--accept-commandwith thesha256the run reported. - Every other path runs only the command the user already accepted. This includes updates started from
/pluginand the background runs described in When Claude Code re-runs the command. When none was accepted, Claude Code refuses to run the command and tells the user how to review it. Claude Code never installs a command-sourced plugin as a dependency of another plugin, so users install it themselves first. - If you change the entry's
command, or switch itsmode, users keep the version they already have and Claude Code stops re-running the command. In interactive sessions, the/pluginErrors tab shows the new command until the user reviews and accepts it by runningclaude plugin update <plugin>@<marketplace>.
Administrators can block command sources across an organization with the managed setting disableCommandPluginSources. If an organization sets allowManagedHooksOnly, Claude Code blocks command sources by default.
Documentation snapshot · 2026-09-23