Skip to content

fix: use CLAUDE_PLUGIN_ROOT instead of PLUGIN_DIR#1

Merged
oryband merged 1 commit into
masterfrom
fix/use-claude-plugin-root-env-var
Mar 5, 2026
Merged

fix: use CLAUDE_PLUGIN_ROOT instead of PLUGIN_DIR#1
oryband merged 1 commit into
masterfrom
fix/use-claude-plugin-root-env-var

Conversation

@oryband
Copy link
Copy Markdown
Owner

@oryband oryband commented Mar 4, 2026

Summary

  • PLUGIN_DIR is not a valid Claude Code environment variable — it was a proposed name from #12541 that was never implemented
  • The correct variable is CLAUDE_PLUGIN_ROOT, as documented in the official plugin reference
  • This caused the hook to fail on every Bash tool invocation with "PreToolUse:Bash hook error" because the script path resolved to /approve-compound-bash.sh

Test plan

  • Install the plugin and verify Bash commands no longer produce "hook error"
  • Verify compound commands are still auto-approved correctly

🤖 Generated with Claude Code (Opus 4.6)

PLUGIN_DIR is not a valid Claude Code environment variable and was never
implemented. The correct variable is CLAUDE_PLUGIN_ROOT, as documented
in the official plugin reference. This caused the hook to fail on every
Bash tool invocation with "PreToolUse:Bash hook error".

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@oryband oryband merged commit b323600 into master Mar 5, 2026
2 checks passed
@oryband oryband deleted the fix/use-claude-plugin-root-env-var branch March 5, 2026 18:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant