-
Notifications
You must be signed in to change notification settings - Fork 461
Open
Description
Summary
Wildcard patterns in ALLOWED_TOOLS (e.g., Bash(git *)) don't appear to work correctly. Even setting ALLOWED_TOOLS="*" still results in permission denials.
This was split from #143 which addressed the display bug for denied commands.
Evidence
User 1 (from #143)
ALLOWED_TOOLS="Write,Read,Edit,Bash(git *),Bash(npm *),Bash(pytest)"Result: git commit commands blocked
User 2 (from #143)
ALLOWED_TOOLS="*" # Allow EVERYTHINGResult: Still got permission denied after 1 API call
[2026-02-01 11:56:33] [SUCCESS] 🏁 Graceful exit triggered: permission_denied
Current Implementation
In ralph_loop.sh lines 950-960, tools are added to the command array:
if [[ -n "$CLAUDE_ALLOWED_TOOLS" ]]; then
CLAUDE_CMD_ARGS+=("--allowedTools")
local IFS=','
read -ra tools_array <<< "$CLAUDE_ALLOWED_TOOLS"
for tool in "${tools_array[@]}"; do
tool=$(echo "$tool" | sed 's/^[[:space:]]*//;s/[[:space:]]*$//')
if [[ -n "$tool" ]]; then
CLAUDE_CMD_ARGS+=("$tool")
fi
done
fiThis looks correct - tools are properly split and added.
Investigation Needed
-
Verify
--allowedToolsflag is reaching Claude CLI- Add debug logging to print the actual command being executed
- Confirm the tools array is populated correctly
-
Test Claude CLI directly
- Does
claude --allowedTools "Bash(git *)" -p "run git status"work? - Does
claude --allowedTools "*" -p "run npm install"work? - Test both interactive and non-interactive modes
- Does
-
Check Claude CLI documentation
- Does Claude CLI support
*as "allow all"? - What's the correct wildcard syntax for
Bashcommands? - Is there a difference between
Bash(git *)vsBash(git:*)?
- Does Claude CLI support
-
Mode-specific behavior
- Does the
-pflag (non-interactive) have different permission handling? - Does
--continueaffect permissions?
- Does the
Possible Causes
- Claude CLI doesn't support
*as "allow all tools" - Claude CLI doesn't support space-based wildcards in non-interactive mode
- The
--allowedToolsflag isn't being passed in all code paths - Shell escaping issues when building the command
Related
- Permission denied error doesn't show which commands were blocked + Bash(git *) pattern not working #143 - Original issue (display bug fixed, wildcard issue moved here)
- No Approval Request, silent fail #101 - Permission denial detection feature
lib/response_analyzer.sh- Permission denial extractionralph_loop.sh-build_claude_command()function
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels