"Compound commands" can't be allow-listed

Resolved 💬 2 comments Opened Jul 23, 2025 by dpkirchner Closed Aug 15, 2025

Bug Description
I'm trying to work around an issue with Claude Code: it frequently gets lost, pointlessly wasting tokens because it's in the wrong directory. To resolve this I am having it run standard commands like cd $(git rev-parse --show-toplevel) && ./whatever/command/i/want.sh. However, Claude Code always asks me permission for this, even if I put this literal string in the allow list and restart.

For what it is worth, both the git rev-parse --show-toplevel command and the .../want.sh commands are allow-listed and they both work on their own. cd $(git rev-parse --show-toplevel) without && does not work without confirmation.

I think I'm hitting a bug, and I think it probably has to do with the fact this is a "compound command" (that's what Claude Code calls it, anyway).

Environment Info

  • Platform: linux
  • Terminal: kitty
  • Version: 1.0.58
  • Feedback ID: c0f7829f-8027-4604-a8b4-0a75fb3b4e9b

Errors

[]

View original on GitHub ↗

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