Skip to content

ralph-wiggum plugin: Bash permission check fails despite allowed-tools declaration #16389

@bighapa67

Description

@bighapa67

Description

The ralph-wiggum plugin's /ralph-loop command fails with a permission error even though:

  1. The plugin correctly declares allowed-tools in its command definition
  2. Manual Bash(...) permissions are added to settings.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

  1. Install the ralph-wiggum plugin:

    claude plugin install ralph-wiggum@claude-plugins-official
  2. Run the ralph-loop command:

    /ralph-wiggum:ralph-loop "Test task" --completion-promise "DONE" --max-iterations 5
  3. 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:

  1. The markdown code fence markers are included in the pattern being checked
  2. 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 match
  • Bash(*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:

  1. Raw markdown parsing: The pattern being checked includes markdown fence markers, suggesting the command isn't being properly extracted from the markdown

  2. 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

This appears to be a separate issue from the newlines bug that was recently fixed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions