[BUG] commit-commands plugin: allowed-tools missing git commands used in dynamic context injection

Resolved 💬 4 comments Opened Jan 29, 2026 by uditrana Closed Feb 28, 2026

Bug Description

The official commit-commands plugin's /commit command fails with a permission error because the allowed-tools list doesn't include all the git commands used in the dynamic context injection.

Steps to Reproduce

  1. Ensure you're on the main branch (or any branch)
  2. Make some changes to files
  3. Run /commit
  4. Observe the error

Expected Behavior

The /commit command should successfully gather git context via dynamic context injection and create a commit.

Actual Behavior

Error message:

Error: Bash command failed for pattern "!\`git branch --show-current\`": main

Root Cause

In plugins/commit-commands/commands/commit.md:

allowed-tools (line 2):

allowed-tools: Bash(git add:*), Bash(git status:*), Bash(git commit:*)

Dynamic context injection commands (lines 8-11):

  • !\git status\`` (allowed)
  • !\git diff HEAD\`` (NOT allowed)
  • !\git branch --show-current\`` (NOT allowed - causes the error)
  • !\git log --oneline -10\`` (NOT allowed)

The dynamic context injection commands are blocked because they're not in the allowed-tools list.

Suggested Fix

Update the allowed-tools in commit.md to include all git commands used:

allowed-tools: Bash(git add:*), Bash(git status:*), Bash(git commit:*), Bash(git diff:*), Bash(git branch:*), Bash(git log:*)

Environment

  • Claude Code CLI (latest)
  • Plugin: commit-commands@claude-plugins-official
  • This affects all users of the /commit command

Impact

The /commit command is currently non-functional for all users due to this permissions mismatch.

View original on GitHub ↗

This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗