From 3681ea6a747b252b4a06406b8cbfad9c9eec6711 Mon Sep 17 00:00:00 2001 From: Lorenzo Padoan Date: Mon, 29 Dec 2025 22:40:36 +0100 Subject: [PATCH] fix(ralph-wiggum): convert multi-line bash to single line MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The ralph-loop command fails with 'Command contains newlines that could separate multiple commands' error because Claude Code's security restrictions block multi-line bash commands. This fix converts the bash block to a single line using && chaining while preserving all functionality. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 --- plugins/ralph-wiggum/commands/ralph-loop.md | 32 +-------------------- 1 file changed, 1 insertion(+), 31 deletions(-) diff --git a/plugins/ralph-wiggum/commands/ralph-loop.md b/plugins/ralph-wiggum/commands/ralph-loop.md index e54de24d0f..288caa6b3e 100644 --- a/plugins/ralph-wiggum/commands/ralph-loop.md +++ b/plugins/ralph-wiggum/commands/ralph-loop.md @@ -10,37 +10,7 @@ hide-from-slash-command-tool: "true" Execute the setup script to initialize the Ralph loop: ```! -"${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 "═══════════════════════════════════════════════════════════" - echo "CRITICAL - Ralph Loop Completion Promise" - echo "═══════════════════════════════════════════════════════════" - echo "" - echo "To complete this loop, output this EXACT text:" - echo " $PROMISE" - echo "" - echo "STRICT REQUIREMENTS (DO NOT VIOLATE):" - echo " ✓ Use 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 +"${CLAUDE_PLUGIN_ROOT}/scripts/setup-ralph-loop.sh" $ARGUMENTS && 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" && echo "" && echo "STRICT REQUIREMENTS (DO NOT VIOLATE):" && echo " ✓ Use 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 ``` Please work on the task. When you try to exit, the Ralph loop will feed the SAME PROMPT back to you for the next iteration. You'll see your previous work in files and git history, allowing you to iterate and improve.