What
A new environment variable, CLAUDE_CODE_PLUGIN_DIRS, lets a session specify extra plugin folders (as a colon/path-list separated string) that get merged with any folders passed via --plugin-dir at startup.
- A new helper module parses, validates, dedupes, and can subtract these directories. Entries that are absolute paths outside the home directory, or use
~, are rejected with a warning rather than accepted, and there's a canned hint message for unsetting the variable. - When set,
CLAUDE_CODE_PLUGIN_DIRSis subject to the same enterprise sideload policy block as--plugin-dirand--plugin-dir-no-mcp, with its own recovery hint. - Plugin sources of type
pluginDirectoryare now exempted from the usual blocklist check when a separate gate condition holds, before normal blocklist matching runs.
Why
This gives users and scripts a way to sideload plugin directories via environment configuration instead of only command-line flags, while keeping the same validation and enterprise policy controls that apply to --plugin-dir.
Names in the bundleCLAUDE_CODE_PLUGIN_DIRS
Documented inclaude-code/plugins/cli-reference
The entry above is what we published on the day. These lines were added later, as Anthropic's own pages caught up, and they sit beside the original rather than replacing it.
Confirmed since
Anthropic's documentation has since written up CLAUDE_CODE_PLUGIN_DIRS, on All settings.
The same check covers plugin folders named in the [`CLAUDE_CODE_PLUGIN_DIRS`](/docs/en/env-vars#variables) environment variable, which requires Claude Code v2.1.280 or later. When the variable names a folder, Claude Code exits with the sam…settings-reference see the edit
Something disagreesSomething we can check disagrees with this entry, or the writer said they could not settle it.
The writer flagged doubt
The finding does not say what these paths are validated or used for beyond plugin loading, or in what situation the refusal message is…
Anthropic's documentation agrees
Anthropic's documentation has since written up CLAUDE_CODE_PLUGIN_DIRS, on All settings.
The name it cites is new in this build
New in this build: CLAUDE_CODE_PLUGIN_DIRS