[BUG] ralph-wiggum pluggin - /ralph-wiggum:cancel-ralph command is erroring out
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?
Please find snippet from claude code
/ralph-wiggum:cancel-ralph
⎿ Error: Bash command failed for pattern "``!`
if [[ -f .claude/ralph-loop.local.md ]]; then
ITERATION=$(grep '^iteration:' .claude/ralph-loop.local.md | sed 's/iteration: *//')
echo "FOUND_LOOP=true"
echo "ITERATION=$ITERATION"
else
echo "FOUND_LOOP=false"
fi
": [stderr]echo'
(eval):1: parse error near
⏺ This is a bug in the /ralph-wiggum:cancel-ralph command implementation. The error shows that the command is trying to execute bash code that includes markdown code fence syntax (```),
which is causing a shell parsing error.
The command appears to be attempting to:
- Check if .claude/ralph-loop.local.md exists
- Extract the iteration number from it
- Report whether a loop was found
But the bash execution is failing because the markdown code fence delimiters are being included in the command string that's being evaluated.
Issue: (eval):1: parse error near 'echo' indicates the shell can't parse the command because of the malformed syntax with the code fences.
What Should Happen?
/ralph-wiggum:cancel-ralph command should be able to cancel the loop.
Error Messages/Logs
/ralph-wiggum:cancel-ralph
⎿ Error: Bash command failed for pattern "!
if [[ -f .claude/ralph-loop.local.md ]]; then
ITERATION=$(grep '^iteration:' .claude/ralph-loop.local.md | sed 's/iteration: *//')
echo "FOUND_LOOP=true"
echo "ITERATION=$ITERATION"
else
echo "FOUND_LOOP=false"
fi
": [stderr]
(eval):1: parse error near `echo'
Steps to Reproduce
- /ralph-wiggum:ralph-loop task
- /ralph-wiggum:cancel-ralph
Claude Model
Sonnet (default)
Is this a regression?
I don't know
Last Working Version
_No response_
Claude Code Version
2.0.55
Platform
Anthropic API
Operating System
macOS
Terminal/Shell
Terminal.app (macOS)
Additional Information
_No response_
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗