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

  1. Have these patterns in settings.json allow list:
  • Bash(cd *)
  • Bash(git show *)
  1. Also have the target directory in additionalDirectories:

``json
"additionalDirectories": ["/Users/.../Workspace/Veekday"]
``

  1. A subagent runs a compound command like:

``bash
cd /Users/.../Workspace/Veekday/por-su-standard-package && git show 6ed72bb --stat 2>&1 | head -30
``

  1. Expected: Auto-approved (both cd * and git show * are allowed)
  2. 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.

View original on GitHub ↗

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