ralph-wiggum plugin: Multi-line bash in command markdown files causes 'Command contains newlines' error
Resolved 💬 6 comments Opened Jan 2, 2026 by vzwjustin Closed Feb 17, 2026
Description
The official ralph-wiggum plugin's Skill commands fail with a security error when invoked via the Skill tool:
Bash command permission check failed for pattern "...": Command contains newlines that could separate multiple commands
Steps to Reproduce
- Install the ralph-wiggum plugin from claude-plugins-official
- Try to invoke the skill:
````
/ralph-loop Test prompt --max-iterations 1
- Error occurs before command execution
Root Cause
The command markdown files (commands/ralph-loop.md and commands/cancel-ralph.md) use multi-line bash scripts inside `! blocks:
ralph-loop.md (lines 12-43):
\`\`\`!
"${CLAUDE_PLUGIN_ROOT}/scripts/setup-ralph-loop.sh" $ARGUMENTS
# Extract and display completion promise if set
if [ -f .claude/ralph-loop.local.md ]; then
PROMISE=$(grep '^completion_promise:' ...)
# ... 25+ more lines
fi
\`\`\`
cancel-ralph.md (lines 9-16):
\`\`\`!
if [[ -f .claude/ralph-loop.local.md ]]; then
ITERATION=$(grep '^iteration:' .claude/ralph-loop.local.md | sed 's/iteration: *//')
echo "FOUND_LOOP=true"
echo "ITERATION=$ITERATION"
else
echo "FOUND_LOOP=false"
fi
\`\`\`
Claude Code's Bash security check rejects commands containing newlines to prevent command injection. This check happens before the allowed-tools permission is evaluated.
Workaround
Calling the script directly works:
"/path/to/plugins/ralph-wiggum/.../scripts/setup-ralph-loop.sh" /tmp/project
Suggested Fix
- Move multi-line logic into the shell scripts (e.g., add completion promise display to
setup-ralph-loop.sh) - Keep command markdown files as single-line script invocations:
\`\`\`!
"${CLAUDE_PLUGIN_ROOT}/scripts/setup-ralph-loop.sh" $ARGUMENTS
\`\`\`
- Create a
cancel-ralph.shscript for the cancel command
Environment
- Claude Code version: Latest
- Platform: macOS
- Plugin source: claude-plugins-official marketplace
Files Affected
commands/ralph-loop.md- has multi-line bashcommands/cancel-ralph.md- has multi-line bashscripts/setup-ralph-loop.sh- needs completion promise display logic addedscripts/cancel-ralph.sh- needs to be created
This issue has 6 comments on GitHub. Read the full discussion on GitHub ↗