[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 list
  • gh 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

  1. Add Bash(gh:*) to allowed tools
  2. Run a simple command like gh issue list - no prompt (works correctly)
  3. Run a multi-line command:
gh issue create \
  --title "Test issue" \
  --label "bug" \
  --body-file /tmp/body.md
  1. 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

View original on GitHub ↗

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