-
Notifications
You must be signed in to change notification settings - Fork 10.9k
ralph-wiggum plugin: Bash permission check fails despite allowed-tools declaration #16389
Description
Description
The ralph-wiggum plugin's /ralph-loop command fails with a permission error even though:
- The plugin correctly declares
allowed-toolsin its command definition - Manual
Bash(...)permissions are added tosettings.local.json
The permission system appears to be checking the raw markdown content (including code fence markers) rather than the parsed command, and/or not handling quoted paths correctly.
Steps to Reproduce
-
Install the ralph-wiggum plugin:
claude plugin install ralph-wiggum@claude-plugins-official
-
Run the ralph-loop command:
/ralph-wiggum:ralph-loop "Test task" --completion-promise "DONE" --max-iterations 5
-
Observe the error
Expected Behavior
The command should execute successfully because the plugin's commands/ralph-loop.md declares:
allowed-tools: ["Bash(${CLAUDE_PLUGIN_ROOT}/scripts/setup-ralph-loop.sh)"]Actual Behavior
Error message:
Error: Bash command permission check failed for pattern "` ` `!
"/home/user/.claude/plugins/cache/claude-plugins-official/ralph-wiggum/15b07b46dab3/scripts/setup-ralph-loop.sh" "Test task" --completion-promise "DONE" --max-iterations 5
` ` `": This command requires approval
Note that the error shows:
- The markdown code fence markers are included in the pattern being checked
- The path has quotes around it (
"/home/user/...")
Attempted Workarounds
Added various permission patterns to .claude/settings.local.json:
Bash(/home/user/.claude/plugins/cache/claude-plugins-official/ralph-wiggum/:*)- No matchBash(*ralph-wiggum*)- Rejected by validator ("Use:*for prefix matching")
None matched because the actual command starts with a quote character.
Environment
- Claude Code version: Latest (Jan 5, 2026)
- OS: Linux (WSL2 Ubuntu 22.04 on Windows 11)
- Plugin version: ralph-wiggum@claude-plugins-official (hash: 15b07b46dab3)
Analysis
The permission pattern matching appears to have two issues:
-
Raw markdown parsing: The pattern being checked includes markdown fence markers, suggesting the command isn't being properly extracted from the markdown
-
Quoted path mismatch: The actual command wraps the path in quotes for shell safety (
"/path/to/script"), but permission patterns don't include quotes, causing a mismatch
Related Issues
- /ralph-loop skill fails due to multi-line bash command security restriction claude-plugins-official#91 - Multi-line bash fix was merged Jan 2, 2026
- ralph-wiggum:ralph-loop skill fails with 'Command contains newlines' error #15640 - "Command contains newlines" variant (different error, same plugin)
This appears to be a separate issue from the newlines bug that was recently fixed.