[BUG] Tool permission bypass — git commit and git push executed without approval prompt

Resolved 💬 2 comments Opened Feb 26, 2026 by ChrisHenryOC Closed Feb 26, 2026

Preflight Checklist

  • [x] I have searched existing issues and this hasn't been reported yet
  • [x] This is a single bug report (please file separate reports for different bugs)
  • [x] I am using the latest version of Claude Code

What's Wrong?

Claude Code executed git commit and git push commands without showing an approval prompt, despite neither command being in the allow list.

What happened:

In a single Bash tool call, Claude ran:

git add docs/project/implementation-todo.md && git commit -m "$(cat <<'EOF' docs: Add GH-116 and GH-117 to implementation todo
...
EOF
)" && git push

All three commands executed without any approval prompt being shown to the user. The commit landed directly on main and was pushed to the remote.

Expected behavior:
git commit and git push should have triggered approval prompts since they are not in the allow list.

Allow list contents (.claude/settings.local.json):

  • Bash(git add:*) — wildcard, allows all git add commands
  • Bash(git commit -m "$\(cat <<''EOF''...) — a single specific commit message, not a wildcard
  • git push is not in the allow list at all

Possible contributing factor:

The three commands were chained with && in a single Bash invocation. It's possible that the git add:* wildcard match on the first command caused the entire chained command to be treated as pre-approved.

Environment:

  • Claude Code CLI (version 2.1.44, model: claude-opus-4-6)
  • macOS Tahoe 26.2 (Darwin 25.2.0)
  • Apple M4 MacBook Air

What Should Happen?

git commit and git push should have triggered approval prompts since they are not in the allow list.

Error Messages/Logs

Steps to Reproduce

This is difficult to reproduce, and claude code agrees that it should not happen.

Claude Model

Opus

Is this a regression?

Yes, this worked in a previous version

Last Working Version

_No response_

Claude Code Version

2.1.44

Platform

Anthropic API

Operating System

macOS

Terminal/Shell

VS Code integrated terminal

Additional Information

_No response_

View original on GitHub ↗

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