ralph-wiggum plugin: /ralph-loop command fails due to multiline bash block

Resolved 💬 3 comments Opened Dec 29, 2025 by liransmartlighthouse Closed Jan 2, 2026

Description

The /ralph-loop command in the ralph-wiggum plugin fails with an error about multiline bash commands.

Error Message

Bash command permission check failed for pattern "```!
...
": Command contains newlines that could separate multiple commands

Root Cause

The command file commands/ralph-loop.md contains a multiline bash block that includes an if statement for displaying the completion promise:

"${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:' .claude/ralph-loop.local.md | ...)
  if [ -n "$PROMISE" ] && [ "$PROMISE" != "null" ]; then
    echo "..."
  fi
fi

Claude Code's security model blocks multiline bash commands entirely, regardless of permission allowlist settings.

Workaround

Running the setup script directly works:

/home/liran/.claude/plugins/cache/claude-plugins-official/ralph-wiggum/6d3752c000e2/scripts/setup-ralph-loop.sh "Task" --max-iterations 10 --completion-promise "DONE"

Suggested Fix

Move the if block logic for displaying the completion promise into the setup-ralph-loop.sh script itself, so the command file only needs to execute a single-line script call.

Environment

  • Claude Code CLI
  • Linux (Ubuntu)
  • ralph-wiggum plugin version: 6d3752c000e2

View original on GitHub ↗

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