Plugin ```! bash execution syntax not parsed correctly - permission check fails
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
- Install the
ralph-loop@claude-plugins-officialplugin - Enable it in settings:
"ralph-loop@claude-plugins-official": true - 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-officialversion96276205880a
Analysis
The `! syntax appears to be intended for auto-executing bash commands in plugin command files, but the parser is not:
- Recognizing the
`!as a special directive - Extracting the command from inside the fences
- 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
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗