[BUG] Bash chaining with cd doesn't get auto-approved

Resolved 💬 5 comments Opened Oct 3, 2025 by Nxt3 Closed Feb 1, 2026

Preflight Checklist

  • [x] I have searched existing issues and this hasn't been reported yet
  • [x] This is a single bug report (please file separate reports for different bugs)
  • [x] I am using the latest version of Claude Code

What's Wrong?

I have the following permissions.allow items in my global settings:

"Bash(cd :*)",
"Bash(npx nx build :*)",
"Bash(npx nx lint :*)",
"Bash(npx nx test :*)",
"Bash(cd :* && npx nx build :*)",
"Bash(cd :* && npx nx lint :*)",
"Bash(cd :* && npx nx test :*)",

This is to trigger commands like this: cd $(git rev-parse --show-toplevel) && npx nx lint my-nx-project.
This command will cd to the repo-root and then run linting.

When Claude runs this command, I always need to approve it manually.

What Should Happen?

Claude should execute the command without manual intervention.

Steps to Reproduce

Add this to permissions.allow:

"Bash(cd :* && echo :*)",

Now run cd $(git rev-parse --show-toplevel) && echo "Hey"

Claude will ask for permission to run the command.

Claude Model

Sonnet (default)

Is this a regression?

No, this never worked

Last Working Version

_No response_

Claude Code Version

2.0.5

Platform

AWS Bedrock

Operating System

macOS

Terminal/Shell

iTerm2

Additional Information

Related #270

I'm not being prompted to "never ask again" like this ticket suggests.

<img width="1030" height="522" alt="Image" src="https://github.com/user-attachments/assets/7a87d50f-d94e-482b-8588-2985ce9816da" />

View original on GitHub ↗

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