Skip to content

ralph-wiggum:ralph-loop skill fails with 'Command contains newlines' error #69

@jaspersorrio

Description

@jaspersorrio

Description

When running the /ralph-wiggum:ralph-loop skill, the command fails with:

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

Root Cause

The commands/ralph-loop.md file in the ralph-wiggum plugin contains a multi-line bash script in its code block (lines 12-44):

"${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 | sed 's/completion_promise: *//' | sed 's/^"\(.*\)"$/\1/')
  if [ -n "$PROMISE" ] && [ "$PROMISE" != "null" ]; then
    echo ""
    echo "═══════════════════════════════════════════════════════════"
    # ... more echo statements ...
  fi
fi

Claude Code's bash security check blocks commands containing newlines to prevent command injection attacks.

Suggested Fix

Move the "extract and display completion promise" logic from ralph-loop.md into the scripts/setup-ralph-loop.sh script itself, so only a single-line command is executed.

Steps to Reproduce

  1. Run Claude Code
  2. Execute: /ralph-wiggum:ralph-loop "Build a REST API" --completion-promise "COMPLETE" --max-iterations 50
  3. Observe the error about newlines in command

Expected Behavior

The ralph-loop skill should execute successfully and start the Ralph Wiggum loop.

Environment

  • Platform: macOS (Darwin 24.6.0)
  • Plugin version: 6d3752c

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