[BUG] Bash permission wildcard not matching multi-line commands with backslash continuations
Resolved 💬 2 comments Opened Jan 2, 2026 by tonycassara Closed Jan 2, 2026
Description
Bash permission patterns using wildcards (*) are not matching commands that use backslash line continuations, even though the pattern should match based on prefix logic.
Environment
- Claude Code version: Latest
- Platform: macOS (Darwin 25.1.0)
Configuration
The allowed tools list includes:
Bash(gh:*)
Expected behavior
The pattern Bash(gh:*) should match:
gh issue listgh issue create --title "test"- Multi-line commands with backslash continuations:
gh issue create \
--title "test" \
--label "bug" \
--body-file /tmp/body.md
Actual behavior
Claude Code prompts for permission when running multi-line gh commands with backslash continuations, even though Bash(gh:*) is in the allowed tools list.
Single-line gh commands work fine without prompting.
Steps to reproduce
- Add
Bash(gh:*)to allowed tools - Run a simple command like
gh issue list- no prompt (works correctly) - Run a multi-line command:
gh issue create \
--title "Test issue" \
--label "bug" \
--body-file /tmp/body.md
- Observe permission prompt despite matching prefix
Related issues
- #13137 - Similar issue with redirects (
2>&1) not matching wildcard patterns - #13154 - Feature request for regex/glob pattern support
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗