Non-allowlisted Bash commands silently rejected instead of prompting user
Resolved 💬 5 comments Opened Feb 18, 2026 by LukasMerz Closed Mar 19, 2026
Bug Description
When Bash commands are not in the permissions.allow list in settings.json, they are silently rejected with an exit code (1 or 2) and no output, instead of prompting the user for approval.
Expected Behavior
Non-allowlisted Bash commands should prompt the user to approve or deny execution, as described in the documentation:
"When you attempt to call a tool that is not automatically allowed by the user's permission mode or permission settings, the user will be prompted so that they can approve or deny the execution."
Actual Behavior
Commands not matching any Bash(...) pattern in the allow list return exit code 1 (or exit code 2) with no output and no prompt. The user is never asked to approve or deny.
Steps to Reproduce
- Configure
~/.claude/settings.jsonwith specificBash(...)allow patterns (e.g.,Bash(git *),Bash(ls *), etc.) - Start a Claude Code session
- Have Claude run a Bash command not in the allow list (e.g.,
echo "hello",pwd,whoami) - Observe: command silently fails with exit code 1, user is never prompted
Environment
- OS: Windows 11 Enterprise 10.0.22631
- Shell: bash (Git Bash)
- Claude Code: latest channel
Additional Context
Commands that do match the allow list work fine (e.g., git --version succeeds). The issue is specifically that non-matching commands are silently swallowed rather than triggering a permission prompt.
This issue has 5 comments on GitHub. Read the full discussion on GitHub ↗