Allow git merge without prompting - #312
Merged
Merged
Conversation
Move Bash(git merge *) from the ask list to the allow list. The ask rule forced a prompt on every merge even though the blanket Bash(git *) allow matched (ask rules take precedence over allow), which blocked subagents from resolving PR branch conflicts: a background permission prompt gives the user no context about which branch is being merged into. The explicit allow entry is redundant with Bash(git *) today, but becomes load-bearing once #208 replaces the blanket with an explicit allowlist: without it, merges would fall through to the auto-mode classifier (occasional transient-error denials) or a manual-mode prompt. git merge is local-only and recoverable: committed state stays reachable via the merge commit parents, uncommitted work aborts the merge instead of being overwritten, and nothing touches the remote until a separate push. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01RGD2NDthkx859WNGeDKKBN
ikuwow
marked this pull request as ready for review
July 20, 2026 14:42
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Move
Bash(git merge *)from the ask list to the allow list in claude/settings.json, so git merge runs without a permission prompt.Background
Ask rules take precedence over allow rules ("a matching ask rule prompts even when a more specific allow rule also matches the same call" — https://code.claude.com/docs/en/permissions ), so every merge prompted even though the blanket
Bash(git *)allow matched. This blocked subagents from resolving PR branch conflicts: a permission prompt raised from a background agent gives the user no context about which branch is being merged into, so it cannot be approved meaningfully.Why an explicit allow entry (and why removing the ask rule alone is not enough)
Bash(git *), but Remove the Bash(git *) blanket allow and add destructive-git deny rules #208 replaces that blanket with an explicit allowlist that deliberately leaves merge outRisk assessment
git merge is local-only and recoverable:
git reflog, 90-day default perman git-gc)git pushgit revert -m 1 <merge commit>(force push stays denied)The genuinely destructive git commands (
reset --hard,clean,stash drop/clear,rebase,commit --amend) stay in ask/deny.Interaction with #208
#208's branch (
feature/explicit-git-allowlist-187) also deletes theBash(git merge *)ask entry, so the ask-side change merges cleanly either way. The new allow entry sits next toBash(git *), which #208 replaces; the expected resolution is to keep this entry in #208's allowlist.Verification
jq -e '.permissions.allow | index("Bash(git merge *)")'returns an index; the same lookup on.permissions.askreturns nullCheck JSON.....Passed(hook output at commit time)git merge origin/mainon a feature branch runs without a permission prompt