{"version":"2.1.280","anchor":"claude-code-plugin-dirs-env-var-for-sideloading-plugin-direc","canonical_anchor":"claude-code-plugin-dirs-env-var-for-sideloading-plugin-direc","heading":"New CLAUDE_CODE_PLUGIN_DIRS environment variable for sideloading plugin directories","tier":"use","area":"Plugins","url":"https:\/\/changelogs.core-directive.com\/v\/2.1.280\/e\/claude-code-plugin-dirs-env-var-for-sideloading-plugin-direc","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.280","markdown":"### New CLAUDE_CODE_PLUGIN_DIRS environment variable for sideloading plugin directories\n\nCLAUDE_CODE_PLUGIN_DIRS lets a session list extra plugin folders to load alongside --plugin-dir\n\n**What**\n\nA 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.\n\n- 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.\n\n- When set, `CLAUDE_CODE_PLUGIN_DIRS` is subject to the same enterprise sideload policy block as `--plugin-dir` and `--plugin-dir-no-mcp`, with its own recovery hint.\n\n- Plugin sources of type `pluginDirectory` are now exempted from the usual blocklist check when a separate gate condition holds, before normal blocklist matching runs.\n\n**Why**\n\nThis 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`.\n\n- Area: Plugins\n- Names: `CLAUDE_CODE_PLUGIN_DIRS`, `--plugin-dir`\n- Tier: Use it now\n- Useful: 5\/5\n- Signal: 2\/5"}