claude-code icon indicating copy to clipboard operation
claude-code copied to clipboard

[BUG] `/ralph-wiggum:ralph-loop` has a problem with newline characters.

Open best-joker opened this issue 2 months ago β€’ 23 comments

Preflight Checklist

  • [x] I have searched existing issues and this hasn't been reported yet
  • [x] This is a single bug report (please file separate reports for different bugs)
  • [x] I am using the latest version of Claude Code

What's Wrong?

When I use the /ralph-wiggum:ralph-loop command from the Claude Code plugin marketplace, my input is always judged as Command contains newlines that could separate multiple commands. It seems that normal input in the Claude Code input box has issues β€” it gets automatically wrapped onto a new line πŸ€”.

What Should Happen?

Proceed correctly according to the plan.

Error Messages/Logs

Error: Bash command permission check failed for pattern "!
    "/home/joker/.claude/plugins/marketplaces/claude-code-plugins/plugins/ralph-wiggum/scripts/setup-ralph-loop.sh" "Build a MacOS-style
    frontend project that can open and run normally. Use liquid glass material effect, you can refer to
    @ζΆ²ζ€ηŽ»η’ƒζ•ˆζžœζŠ€ζœ―εŽŸη†ζ·±εΊ¦εˆ†ζžζŠ₯ε‘Š.md , think deeply, allow using various MCPs" --completion-promise Done --max-iterations 5

    # 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

Steps to Reproduce

Run 2.0.50 (Claude Code) in Windows Terminal on Win 11 and enter /ralph-wiggum:ralph-loop "Build a MacOS-style frontend project that can open and run normally. Use liquid glass material effect, you can refer to @ζΆ²ζ€ηŽ»η’ƒζ•ˆζžœζŠ€ζœ―εŽŸη†ζ·±εΊ¦εˆ†ζžζŠ₯ε‘Š.md , think deeply, allow using various MCPs" --completion-promise Done --max-iterations 5

Claude Model

Other

Is this a regression?

No, this never worked

Last Working Version

No response

Claude Code Version

2.0.50 (Claude Code)

Platform

Other

Operating System

Windows

Terminal/Shell

Windows Terminal

Additional Information

No response

best-joker avatar Nov 23 '25 01:11 best-joker

Found 2 possible duplicate issues:

  1. https://github.com/anthropics/claude-code/issues/9323
  2. https://github.com/anthropics/claude-code/issues/6660

This issue will be automatically closed as a duplicate in 3 days.

  • If your issue is a duplicate, please close it and πŸ‘ the existing issue instead
  • To prevent auto-closure, add a comment or πŸ‘Ž this comment

πŸ€– Generated with Claude Code

github-actions[bot] avatar Nov 23 '25 01:11 github-actions[bot]

The issue they mentioned is not the same as the one I'm referring to.

best-joker avatar Nov 24 '25 11:11 best-joker

The issue they mentioned is not the same as the one I'm referring to.

Yes, the issue they mentioned is different. By the way, I can reproduce the issue too πŸ˜•

Hugo-Prossaird avatar Dec 02 '25 11:12 Hugo-Prossaird

I can also reproduce same in Claude Code on Mac.

mqofori avatar Dec 03 '25 16:12 mqofori

me too on macos, is there any workaround?

frees11 avatar Dec 08 '25 15:12 frees11

I asked Claude to update the plugin based on https://github.com/anthropics/claude-code/pull/12642 and it works @frees11 @mqofori for information

Hugo-Prossaird avatar Dec 08 '25 15:12 Hugo-Prossaird

I can also reproduce the issue.

ArthurSrz avatar Dec 08 '25 17:12 ArthurSrz

I can also reproduce the issue.

sentineladmin234 avatar Dec 16 '25 13:12 sentineladmin234

can also reproduce same in Claude Code w11

covagashi avatar Dec 16 '25 15:12 covagashi

can also reproduce this issue

1yian avatar Dec 16 '25 18:12 1yian