Plugin ```! bash execution syntax not parsed correctly - permission check fails

Resolved 💬 3 comments Opened Jan 19, 2026 by revoirsoftware Closed Jan 23, 2026

Description

When using the ralph-loop plugin from claude-plugins-official, the `! bash execution syntax in skill/command files is not being parsed correctly. The entire markdown code block (including fences) is being passed to the permission checker instead of just the command inside.

Steps to Reproduce

  1. Install the ralph-loop@claude-plugins-official plugin
  2. Enable it in settings: "ralph-loop@claude-plugins-official": true
  3. Run /ralph-loop:ralph-loop "test task" --max-iterations 3

Expected Behavior

The plugin's command file contains:

\`\`\`!
${CLAUDE_PLUGIN_ROOT}/scripts/setup-ralph-loop.sh $ARGUMENTS
\`\`\`

Expected: Claude Code should parse the `! syntax, extract the command, expand variables, and execute it as a bash command (after permission check against just the command).

Actual Behavior

Error received:

Bash command permission check failed for pattern "```!
"/Users/.../ralph-loop/96276205880a/scripts/setup-ralph-loop.sh" "test task" --max-iterations 3
```": This command requires approval

The permission pattern includes:

  • The opening `! fence
  • The closing ` fence
  • The entire block is treated as a literal bash command

Environment

  • Claude Code version: Latest (as of 2026-01-19)
  • OS: macOS Darwin 25.2.0
  • Plugin: ralph-loop@claude-plugins-official version 96276205880a

Analysis

The `! syntax appears to be intended for auto-executing bash commands in plugin command files, but the parser is not:

  1. Recognizing the `! as a special directive
  2. Extracting the command from inside the fences
  3. Properly checking permissions against the extracted command

Instead, the raw markdown (fences included) is being passed to the permission system.

Workaround Attempted

  • Hardcoding paths instead of using ${CLAUDE_PLUGIN_ROOT} - did not help
  • Removing quotes around the path - did not help
  • Adding explicit permission patterns to settings.json - did not help (pattern doesn't match because of fence inclusion)

Additional Context

The allowed-tools frontmatter in the command file specifies:

allowed-tools: ["Bash(${CLAUDE_PLUGIN_ROOT}/scripts/setup-ralph-loop.sh:*)"]

This pattern would match the command if properly extracted, but fails because the actual string being checked includes the markdown fences.

🤖 Generated with Claude Code

View original on GitHub ↗

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