[BUG] Claude Code requires user approval for git commits using double quotes

Resolved 💬 2 comments Opened Jul 16, 2025 by callmemorgan Closed Jul 25, 2025

Environment

  • Platform (select one):
  • [X] Anthropic API
  • [ ] AWS Bedrock
  • [ ] Google Vertex AI
  • [ ] Other: <!-- specify -->
  • Claude CLI version: 1.0.53 (Claude Code)
  • Operating System: macOS 26 Beta 3
  • Terminal: WarpPreview

Bug Description

Claude Code cannot add git commit -m "<message>" to allowed tools, but can add the ' variant, i.e. git commit -m '<message>'. Claude Code is not reliable at following instructions in CLAUDE.md to always use single quotes when making a commit.

As such, it cannot be left running unattended, because a commit command with double-quotes will result in the process waiting for human / user approval

Steps to Reproduce

  1. Add git and git:commit to allowedTools
  2. Ask Claude to make a commit using "
  3. Note you must approve
  4. disallow command, and suggest using '
  5. Note that commit is approved, as expected

Expected Behavior

If explicit git:commit is allowed, both flavors of commit should be allowed.

Actual Behavior

Must manually approve commits using double-quotes

View original on GitHub ↗

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