ralph-loop: Bash permission check fails when user prompt contains newlines

Resolved 💬 2 comments Opened Jan 7, 2026 by cconnis Closed Jan 7, 2026

Preflight Checklist

  • [x] I have searched existing issues and this hasn't been reported yet
  • [x] This is a single bug report
  • [x] I am using the latest version of Claude Code

What's Wrong?

The ralph-loop skill fails when the user's prompt argument contains newlines (e.g., numbered lists, multi-line task descriptions). This is distinct from issues #16037 and #16028 which were about multi-line bash in the skill definition itself.

The skill definition was fixed to be single-line:

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

However, when $ARGUMENTS expands to include newlines from user input, the entire command becomes multi-line, triggering Claude Code's security check.

Steps to Reproduce

  1. Install ralph-loop plugin (ralph-loop@claude-plugins-official)
  2. Run with a multi-line prompt:
/ralph-loop "Implement the following:

1. Feature one
2. Feature two  
3. Feature three" --max-iterations 10 --completion-promise "DONE"

Expected Behavior

The command should execute successfully with the multi-line user input.

Actual Behavior

Error:

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

Full error output:

Error: Bash command permission check failed for pattern "```!
"/Users/.../scripts/setup-ralph-loop.sh" "Implement the following:

1. Feature one
2. Feature two
3. Feature three" --max-iterations 10 --completion-promise "DONE"
```": Command contains newlines that could separate multiple commands

Why This Matters

Multi-line prompts are natural for complex tasks. Users commonly write:

  • Numbered lists of requirements
  • Step-by-step instructions
  • Acceptance criteria with line breaks

This is a common pattern for ralph-loop usage where users want to specify detailed, structured task descriptions.

Suggested Fixes

Option A: Write arguments to temp file

# In skill invocation, write $ARGUMENTS to file first
ARGS_FILE=$(mktemp)
echo "$ARGUMENTS" > "$ARGS_FILE"
"${CLAUDE_PLUGIN_ROOT}/scripts/setup-ralph-loop.sh" --args-file "$ARGS_FILE"

Option B: Base64 encode arguments

ENCODED=$(echo "$ARGUMENTS" | base64)
"${CLAUDE_PLUGIN_ROOT}/scripts/setup-ralph-loop.sh" --encoded "$ENCODED"

Option C: Use environment variable

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

Environment

  • Claude Code: Latest
  • Plugin: ralph-loop@claude-plugins-official (hash: b97f6eadd929)
  • OS: macOS Darwin 25.2.0

Current Workaround

Users can flatten prompts to single-line:

/ralph-loop "Implement: 1) Feature one, 2) Feature two, 3) Third item" --max-iterations 10

But this is awkward for complex task descriptions.

Related Issues

  • #16037 - Multi-line bash in skill definition (different issue - this was about the plugin code itself)
  • #16028 - Also about plugin definition, not user input

View original on GitHub ↗

This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗