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

fix(ralph-wiggum): Fix multi-line bash command causing execution failure

Open lurenss opened this issue 2 weeks ago • 0 comments

Summary

Fix the ralph-wiggum plugin's /ralph-loop command which fails to execute due to Claude Code's security restrictions on multi-line bash commands.

Problem

When running /ralph-loop, users receive:

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

This is because Claude Code blocks bash commands that contain newlines for security reasons (to prevent command chaining attacks).

Solution

Convert the multi-line bash command block in commands/ralph-loop.md to a single line using && operators to chain commands, which is allowed by Claude Code's security model.

Before (broken):

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

if [ -f .claude/ralph-loop.local.md ]; then
  # multiple lines...
fi

After (fixed):

"${CLAUDE_PLUGIN_ROOT}/scripts/setup-ralph-loop.sh" $ARGUMENTS && if [ -f .claude/ralph-loop.local.md ]; then ...; fi

Test plan

  • [x] Run /ralph-wiggum:ralph-loop "test task" --completion-promise "DONE"
  • [x] Verify loop initializes correctly without the newline error
  • [x] Verify completion promise instructions display correctly

🤖 Generated with Claude Code

lurenss avatar Dec 29 '25 21:12 lurenss