Permission patterns match subcommands in pipes, causing repeated prompts
Resolved 💬 3 comments Opened Feb 24, 2026 by ianegordon Closed Feb 27, 2026
Bug Description
Permission allow patterns match command names anywhere in a piped command, not just at the start. This causes repeated permission prompts that cannot be resolved.
Steps to Reproduce
- Add
"Bash(tail *)"to~/.claude/settings.jsonpermissions allow list - Run a command like
swift test 2>&1 | tail -10 - Claude Code prompts for
tailpermission even thoughBash(tail *)is in the allow list - The command starts with
swift test, nottail— but the permission system seestailin the pipe
Additional Issue: Auto-append uses wrong syntax
When the user approves a prompted permission, it gets appended to settings.local.json using the :* syntax (e.g., "Bash(tail:*)") instead of the space syntax ("Bash(tail *)") documented in the settings. The colon syntax doesn't work, so:
- User gets prompted for
tail - User approves
"Bash(tail:*)"is appended to settings (non-functional)- Next time
tailappears in a pipe, user is prompted again - Loop repeats indefinitely
Expected Behavior
Bash(tail *)should match commands starting withtail, and should NOT trigger ontailappearing after a pipe character- OR piped subcommands should be individually matched against the allow list
- Auto-appended permissions should use the working syntax format
Environment
- macOS (Darwin 25.3.0)
- Claude Code CLI
- Model: claude-opus-4-6
Impact
This creates an infuriating user experience where the same permission is requested repeatedly despite being granted and saved. Users cannot resolve it through the normal approval flow.
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗