Compound bash commands (cd && git show) not matching allow list patterns
Resolved 💬 3 comments Opened Apr 12, 2026 by veekday-data Closed Apr 16, 2026
Description
Compound bash commands using && are not being auto-approved even though each individual command matches an allow list pattern.
Steps to Reproduce
- Have these patterns in
settings.jsonallow list:
Bash(cd *)Bash(git show *)
- Also have the target directory in
additionalDirectories:
``json``
"additionalDirectories": ["/Users/.../Workspace/Veekday"]
- A subagent runs a compound command like:
``bash``
cd /Users/.../Workspace/Veekday/por-su-standard-package && git show 6ed72bb --stat 2>&1 | head -30
- Expected: Auto-approved (both
cd *andgit show *are allowed) - Actual: Prompts for manual approval
Environment
- Claude Code (CLI, VSCode extension)
- macOS
- The command is typically run by a subagent during code review tasks
Notes
Both parts of the compound command individually match allow list patterns. It seems like the pattern matcher evaluates the full command string as a single unit rather than recognizing &&-chained commands where each part is independently allowed.
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗