Skip to content

/ralph-loop skill fails due to multi-line bash command security restriction #91

@innicoder

Description

@innicoder

The /ralph-loop command fails with error:
Error: Bash command permission check failed for pattern "...":
Command contains newlines that could separate multiple commands

Cause:

The skill definition in commands/ralph-loop.md contains a multi-line bash block:

"${CLAUDE_PLUGIN_ROOT}/scripts/setup-ralph-loop.sh" $ARGUMENTS

  ⎿  Error: Bash command permission check failed for pattern "```!
     "/../claude-plugins-official/ralph-wiggum/6d3752c000e2/scripts/setup-ralph-loop.sh" "How are you?"
     
     # Extract and display completion promise if set
     if [ -f .claude/ralph-loop.local.md ]; then
       PROMISE=$(grep '^completion_promise:' .claude/ralph-loop.local.md | sed 's/completion_promise: *//' | sed 's/^"\(.*\)"$/\1/')
       if [ -n "$PROMISE" ] && [ "$PROMISE" != "null" ]; then
         echo ""
         echo "═══════════════════════════════════════════════════════════"
         echo "CRITICAL - Ralph Loop Completion Promise"
         echo "═══════════════════════════════════════════════════════════"
         echo ""
         echo "To complete this loop, output this EXACT text:"
         echo "  <promise>$PROMISE</promise>"
         echo ""
         echo "STRICT REQUIREMENTS (DO NOT VIOLATE):"
         echo "  ✓ Use <promise> XML tags EXACTLY as shown above"
         echo "  ✓ The statement MUST be completely and unequivocally TRUE"
         echo "  ✓ Do NOT output false statements to exit the loop"
         echo "  ✓ Do NOT lie even if you think you should exit"
         echo ""
         echo "IMPORTANT - Do not circumvent the loop:"
         echo "  Even if you believe you're stuck, the task is impossible,"
         echo "  or you've been running too long - you MUST NOT output a"
         echo "  false promise statement. The loop is designed to continue"
         echo "  until the promise is GENUINELY TRUE. Trust the process."
         echo ""
         echo "  If the loop should stop, the promise statement will become"
         echo "  true naturally. Do not force it by lying."
         echo "═══════════════════════════════════════════════════════════"
       fi
     fi
     ```": Command contains newlines that could separate multiple commands

Claude Code's security feature blocks multi-line bash commands to prevent command injection.

Suggested Fix:

Move the if block logic into setup-ralph-loop.sh itself, so the skill only executes a single-line command:

"${CLAUDE_PLUGIN_ROOT}/scripts/setup-ralph-loop.sh" $ARGUMENTS

The promise display logic should be at the end of the setup script rather than in the skill definition.

Environment:

  • OS: macOS (Darwin 25.1.0)
  • Claude Code version: 2.0.76 (Claude Code)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions