[BUG] ralph-wiggum plugin / ralph-loop uses my whole usage because it doesn't respect --max-iterations=X
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?
The ralph-wiggum plugin's /ralph-loop command silently ignores --max-iterations when using the equals-sign syntax (--max-iterations=5), causing infinite loops instead of stopping after N iterations.
/ralph-loop:ralph-loop Do the whole migration acccording to the plan. use
planning-with-files and make sure everything is really migrated - --max-iterations=3
--completion-promise="EVERYTHING MIGRATED TO TANSTACK/QUERY"
Root Cause: The argument parser in setup-ralph-loop.sh only handles space-separated arguments (--max-iterations 5), not equals-sign syntax (--max-iterations=5).
Technical Details
File: plugins/ralph-wiggum/scripts/setup-ralph-loop.sh
Lines: 62-86
The argument parser uses a case statement that only matches exact patterns:
case $1 in
--max-iterations)
MAX_ITERATIONS="$2" # Expects value in NEXT argument
shift 2
;;
When --max-iterations=5 is passed:
- Bash treats it as a single argument:
$1="--max-iterations=5" - This doesn't match the pattern
--max-iterations) - Falls through to the wildcard
*)case - Gets added to
PROMPT_PARTSarray as prompt text MAX_ITERATIONSstays at default0(unlimited)
Affected Options
This bug affects both options:
--max-iterations=N→ Silently ignored (defaults to unlimited)--completion-promise="TEXT"→ Silently ignored (defaults to null)
Suggested Fix
Add support for equals-sign syntax by splitting on =:
case $1 in
--max-iterations)
# Space-separated: --max-iterations 5
MAX_ITERATIONS="$2"
shift 2
;;
--max-iterations=*)
# Equals-sign: --max-iterations=5
MAX_ITERATIONS="${1#*=}" # Extract everything after =
shift
;;
--completion-promise)
COMPLETION_PROMISE="$2"
shift 2
;;
--completion-promise=*)
COMPLETION_PROMISE="${1#*=}"
shift
;;
# ... rest of cases
esac
Impact
Severity: Critical - eating most of the usage limit in one sleep session :-)
- Users expect standard CLI argument syntax to work
- Silent failure leads to unexpected infinite loops
- Difficult to debug (no error message shown)
- Wastes API credits from runaway loops
Additional Information
Example from documentation that might confuse users:
The plugin README shows examples like:
/ralph-loop "Build a REST API" --max-iterations 50
Many users familiar with standard CLI tools (git, npm, curl, etc.) would naturally try:
/ralph-loop "Build a REST API" --max-iterations=50
This is a common pattern in modern CLI tools and follows standard GNU/POSIX conventions.
Related issues:
- #18086 - Max iterations not respected (different root cause)
- #18044 - $ARGUMENTS variable not populated (related to argument parsing)
What Should Happen?
Both of these syntaxes should work identically:
/ralph-loop "Build API" --max-iterations 5 # ✅ Currently works
/ralph-loop "Build API" --max-iterations=5 # ❌ Currently broken
Error Messages/Logs
No error is shown. The option is silently ignored and treated as part of the prompt text. It only reached the stack call limit and failed after 500 iterations.
⏺ Ran 2 stop hooks
⎿ command: curl -s -X POST http://localhost:8765/hook -H 'Content-Type:
application/json' -d "$(cat)" > /dev/null 2>&1 &
⎿ command: ${CLAUDE_PLUGIN_ROOT}/hooks/stop-hook.sh
⎿ Stop hook error:
Do the whole migration acccording to the plan. use planning-with-files and
make sure everything is really migrated - --max-iterations=3
--completion-promise=EVERYTHING MIGRATED TO TANSTACK/QUERY
⏺ ✅ EVERYTHING MIGRATED TO TANSTACK/QUERY
⎿ Stop says: 🔄 Ralph iteration 459 | No completion promise set - loop runs
infinitely
⏺ Ran 2 stop hooks
⎿ command: curl -s -X POST http://localhost:8765/hook -H 'Content-Type:
application/json' -d "$(cat)" > /dev/null 2>&1 &
⎿ command: ${CLAUDE_PLUGIN_ROOT}/hooks/stop-hook.sh
⎿ Stop hook error:
Do the whole migration acccording to the plan. use planning-with-files and
make sure everything is really migrated - --max-iterations=3
--completion-promise=EVERYTHING MIGRATED TO TANSTACK/QUERY
⏺ ✅ EVERYTHING MIGRATED TO TANSTACK/QUERY
⎿ Stop says: 🔄 Ralph iteration 460 | No completion promise set - loop runs
infinitely
⏺ Ran 2 stop hooks
⎿ command: curl -s -X POST http://localhost:8765/hook -H 'Content-Type:
application/json' -d "$(cat)" > /dev/null 2>&1 &
⎿ command: ${CLAUDE_PLUGIN_ROOT}/hooks/stop-hook.sh
⎿ Stop hook error:
Do the whole migration acccording to the plan. use planning-with-files and
make sure everything is really migrated - --max-iterations=3
--completion-promise=EVERYTHING MIGRATED TO TANSTACK/QUERY
⏺ ✅ EVERYTHING MIGRATED TO TANSTACK/QUERY
⎿ Stop says: 🔄 Ralph iteration 461 | No completion promise set - loop runs
infinitely
⏺ Ran 2 stop hooks
⎿ command: curl -s -X POST http://localhost:8765/hook -H 'Content-Type:
application/json' -d "$(cat)" > /dev/null 2>&1 &
⎿ command: ${CLAUDE_PLUGIN_ROOT}/hooks/stop-hook.sh
⎿ Stop hook error:
Do the whole migration acccording to the plan. use planning-with-files and
make sure everything is really migrated - --max-iterations=3
--completion-promise=EVERYTHING MIGRATED TO TANSTACK/QUERY
⏺ ✅ EVERYTHING MIGRATED TO TANSTACK/QUERY
⎿ Stop says: 🔄 Ralph iteration 462 | No completion promise set - loop runs
infinitely
⏺ Ran 2 stop hooks
⎿ command: curl -s -X POST http://localhost:8765/hook -H 'Content-Type:
application/json' -d "$(cat)" > /dev/null 2>&1 &
⎿ command: ${CLAUDE_PLUGIN_ROOT}/hooks/stop-hook.sh
⎿ Stop hook error:
Do the whole migration acccording to the plan. use planning-with-files and
make sure everything is really migrated - --max-iterations=3
--completion-promise=EVERYTHING MIGRATED TO TANSTACK/QUERY
⏺ ✅ EVERYTHING MIGRATED TO TANSTACK/QUERY
⎿ Stop says: 🔄 Ralph iteration 463 | No completion promise set - loop runs
infinitely
⏺ Ran 2 stop hooks
⎿ command: curl -s -X POST http://localhost:8765/hook -H 'Content-Type:
application/json' -d "$(cat)" > /dev/null 2>&1 &
⎿ command: ${CLAUDE_PLUGIN_ROOT}/hooks/stop-hook.sh
⎿ Stop hook error:
Do the whole migration acccording to the plan. use planning-with-files and
make sure everything is really migrated - --max-iterations=3
--completion-promise=EVERYTHING MIGRATED TO TANSTACK/QUERY
⏺ ✅ EVERYTHING MIGRATED TO TANSTACK/QUERY
⎿ Stop says: 🔄 Ralph iteration 464 | No completion promise set - loop runs
infinitely
⏺ Ran 2 stop hooks
⎿ command: curl -s -X POST http://localhost:8765/hook -H 'Content-Type:
application/json' -d "$(cat)" > /dev/null 2>&1 &
⎿ command: ${CLAUDE_PLUGIN_ROOT}/hooks/stop-hook.sh
⎿ Stop hook error:
Do the whole migration acccording to the plan. use planning-with-files and
make sure everything is really migrated - --max-iterations=3
--completion-promise=EVERYTHING MIGRATED TO TANSTACK/QUERY
⏺ ✅ EVERYTHING MIGRATED TO TANSTACK/QUERY
⎿ Stop says: 🔄 Ralph iteration 465 | No completion promise set - loop runs
infinitely
⏺ Ran 2 stop hooks
⎿ command: curl -s -X POST http://localhost:8765/hook -H 'Content-Type:
application/json' -d "$(cat)" > /dev/null 2>&1 &
⎿ command: ${CLAUDE_PLUGIN_ROOT}/hooks/stop-hook.sh
⎿ Stop hook error:
Do the whole migration acccording to the plan. use planning-with-files and
make sure everything is really migrated - --max-iterations=3
--completion-promise=EVERYTHING MIGRATED TO TANSTACK/QUERY
⏺ ✅ EVERYTHING MIGRATED TO TANSTACK/QUERY
⎿ Stop says: 🔄 Ralph iteration 466 | No completion promise set - loop runs
infinitely
⏺ Ran 2 stop hooks
⎿ command: curl -s -X POST http://localhost:8765/hook -H 'Content-Type:
application/json' -d "$(cat)" > /dev/null 2>&1 &
⎿ command: ${CLAUDE_PLUGIN_ROOT}/hooks/stop-hook.sh
⎿ Stop hook error:
Do the whole migration acccording to the plan. use planning-with-files and
make sure everything is really migrated - --max-iterations=3
--completion-promise=EVERYTHING MIGRATED TO TANSTACK/QUERY
⏺ ✅ EVERYTHING MIGRATED TO TANSTACK/QUERY
⎿ Stop says: 🔄 Ralph iteration 467 | No completion promise set - loop runs
infinitely
⏺ Ran 2 stop hooks
⎿ command: curl -s -X POST http://localhost:8765/hook -H 'Content-Type:
application/json' -d "$(cat)" > /dev/null 2>&1 &
⎿ command: ${CLAUDE_PLUGIN_ROOT}/hooks/stop-hook.sh
⎿ Stop hook error:
Do the whole migration acccording to the plan. use planning-with-files and
make sure everything is really migrated - --max-iterations=3
--completion-promise=EVERYTHING MIGRATED TO TANSTACK/QUERY
⏺ ✅ EVERYTHING MIGRATED TO TANSTACK/QUERY
⎿ Stop says: 🔄 Ralph iteration 468 | No completion promise set - loop runs
infinitely
⏺ Ran 2 stop hooks
⎿ command: curl -s -X POST http://localhost:8765/hook -H 'Content-Type:
application/json' -d "$(cat)" > /dev/null 2>&1 &
⎿ command: ${CLAUDE_PLUGIN_ROOT}/hooks/stop-hook.sh
⎿ Stop hook error:
Do the whole migration acccording to the plan. use planning-with-files and
make sure everything is really migrated - --max-iterations=3
--completion-promise=EVERYTHING MIGRATED TO TANSTACK/QUERY
⏺ ✅ EVERYTHING MIGRATED TO TANSTACK/QUERY
⎿ Stop says: 🔄 Ralph iteration 469 | No completion promise set - loop runs
infinitely
⏺ Ran 2 stop hooks
⎿ command: curl -s -X POST http://localhost:8765/hook -H 'Content-Type:
application/json' -d "$(cat)" > /dev/null 2>&1 &
⎿ command: ${CLAUDE_PLUGIN_ROOT}/hooks/stop-hook.sh
⎿ Stop hook error:
Do the whole migration acccording to the plan. use planning-with-files and
make sure everything is really migrated - --max-iterations=3
--completion-promise=EVERYTHING MIGRATED TO TANSTACK/QUERY
⏺ ✅ EVERYTHING MIGRATED TO TANSTACK/QUERY
⎿ Stop says: 🔄 Ralph iteration 470 | No completion promise set - loop runs
infinitely
⏺ Ran 2 stop hooks
⎿ command: curl -s -X POST http://localhost:8765/hook -H 'Content-Type:
application/json' -d "$(cat)" > /dev/null 2>&1 &
⎿ command: ${CLAUDE_PLUGIN_ROOT}/hooks/stop-hook.sh
⎿ Stop hook error:
Do the whole migration acccording to the plan. use planning-with-files and
make sure everything is really migrated - --max-iterations=3
--completion-promise=EVERYTHING MIGRATED TO TANSTACK/QUERY
⏺ ✅ EVERYTHING MIGRATED TO TANSTACK/QUERY
⎿ Stop says: 🔄 Ralph iteration 471 | No completion promise set - loop runs
infinitely
⏺ Ran 2 stop hooks
⎿ command: curl -s -X POST http://localhost:8765/hook -H 'Content-Type:
application/json' -d "$(cat)" > /dev/null 2>&1 &
⎿ command: ${CLAUDE_PLUGIN_ROOT}/hooks/stop-hook.sh
⎿ Stop hook error:
Do the whole migration acccording to the plan. use planning-with-files and
make sure everything is really migrated - --max-iterations=3
--completion-promise=EVERYTHING MIGRATED TO TANSTACK/QUERY
⏺ ✅ EVERYTHING MIGRATED TO TANSTACK/QUERY
⎿ Stop says: 🔄 Ralph iteration 472 | No completion promise set - loop runs
infinitely
⏺ Ran 2 stop hooks
⎿ command: curl -s -X POST http://localhost:8765/hook -H 'Content-Type:
application/json' -d "$(cat)" > /dev/null 2>&1 &
⎿ command: ${CLAUDE_PLUGIN_ROOT}/hooks/stop-hook.sh
⎿ Stop hook error:
Do the whole migration acccording to the plan. use planning-with-files and
make sure everything is really migrated - --max-iterations=3
--completion-promise=EVERYTHING MIGRATED TO TANSTACK/QUERY
⏺ ✅ EVERYTHING MIGRATED TO TANSTACK/QUERY
⎿ Stop says: 🔄 Ralph iteration 473 | No completion promise set - loop runs
infinitely
⏺ Ran 2 stop hooks
⎿ command: curl -s -X POST http://localhost:8765/hook -H 'Content-Type:
application/json' -d "$(cat)" > /dev/null 2>&1 &
⎿ command: ${CLAUDE_PLUGIN_ROOT}/hooks/stop-hook.sh
⎿ Stop hook error:
Do the whole migration acccording to the plan. use planning-with-files and
make sure everything is really migrated - --max-iterations=3
--completion-promise=EVERYTHING MIGRATED TO TANSTACK/QUERY
⏺ ✅ EVERYTHING MIGRATED TO TANSTACK/QUERY
⎿ Stop says: 🔄 Ralph iteration 474 | No completion promise set - loop runs
infinitely
⏺ Ran 2 stop hooks
⎿ command: curl -s -X POST http://localhost:8765/hook -H 'Content-Type:
application/json' -d "$(cat)" > /dev/null 2>&1 &
⎿ command: ${CLAUDE_PLUGIN_ROOT}/hooks/stop-hook.sh
⎿ Stop hook error:
Do the whole migration acccording to the plan. use planning-with-files and
make sure everything is really migrated - --max-iterations=3
--completion-promise=EVERYTHING MIGRATED TO TANSTACK/QUERY
⏺ ✅ EVERYTHING MIGRATED TO TANSTACK/QUERY
⎿ Stop says: 🔄 Ralph iteration 475 | No completion promise set - loop runs
infinitely
⏺ Ran 2 stop hooks
⎿ command: curl -s -X POST http://localhost:8765/hook -H 'Content-Type:
application/json' -d "$(cat)" > /dev/null 2>&1 &
⎿ command: ${CLAUDE_PLUGIN_ROOT}/hooks/stop-hook.sh
⎿ Stop hook error:
Do the whole migration acccording to the plan. use planning-with-files and
make sure everything is really migrated - --max-iterations=3
--completion-promise=EVERYTHING MIGRATED TO TANSTACK/QUERY
⏺ ✅ EVERYTHING MIGRATED TO TANSTACK/QUERY
⎿ Stop says: 🔄 Ralph iteration 476 | No completion promise set - loop runs
infinitely
⏺ Ran 2 stop hooks
⎿ command: curl -s -X POST http://localhost:8765/hook -H 'Content-Type:
application/json' -d "$(cat)" > /dev/null 2>&1 &
⎿ command: ${CLAUDE_PLUGIN_ROOT}/hooks/stop-hook.sh
⎿ Stop hook error:
Do the whole migration acccording to the plan. use planning-with-files and
make sure everything is really migrated - --max-iterations=3
--completion-promise=EVERYTHING MIGRATED TO TANSTACK/QUERY
⏺ ✅ EVERYTHING MIGRATED TO TANSTACK/QUERY
⎿ Stop says: 🔄 Ralph iteration 477 | No completion promise set - loop runs
infinitely
⏺ Ran 2 stop hooks
⎿ command: curl -s -X POST http://localhost:8765/hook -H 'Content-Type:
application/json' -d "$(cat)" > /dev/null 2>&1 &
⎿ command: ${CLAUDE_PLUGIN_ROOT}/hooks/stop-hook.sh
⎿ Stop hook error:
Do the whole migration acccording to the plan. use planning-with-files and
make sure everything is really migrated - --max-iterations=3
--completion-promise=EVERYTHING MIGRATED TO TANSTACK/QUERY
⏺ ✅ EVERYTHING MIGRATED TO TANSTACK/QUERY
⎿ Stop says: 🔄 Ralph iteration 478 | No completion promise set - loop runs
infinitely
⏺ Ran 2 stop hooks
⎿ command: curl -s -X POST http://localhost:8765/hook -H 'Content-Type:
application/json' -d "$(cat)" > /dev/null 2>&1 &
⎿ command: ${CLAUDE_PLUGIN_ROOT}/hooks/stop-hook.sh
⎿ Stop hook error:
Do the whole migration acccording to the plan. use planning-with-files and
make sure everything is really migrated - --max-iterations=3
--completion-promise=EVERYTHING MIGRATED TO TANSTACK/QUERY
⏺ ✅ EVERYTHING MIGRATED TO TANSTACK/QUERY
⎿ Stop says: 🔄 Ralph iteration 479 | No completion promise set - loop runs
infinitely
⏺ Ran 2 stop hooks
⎿ command: curl -s -X POST http://localhost:8765/hook -H 'Content-Type:
application/json' -d "$(cat)" > /dev/null 2>&1 &
⎿ command: ${CLAUDE_PLUGIN_ROOT}/hooks/stop-hook.sh
⎿ Stop hook error:
Do the whole migration acccording to the plan. use planning-with-files and
make sure everything is really migrated - --max-iterations=3
--completion-promise=EVERYTHING MIGRATED TO TANSTACK/QUERY
⏺ ✅ EVERYTHING MIGRATED TO TANSTACK/QUERY
⎿ Stop says: 🔄 Ralph iteration 480 | No completion promise set - loop runs
infinitely
⏺ Ran 2 stop hooks
⎿ command: curl -s -X POST http://localhost:8765/hook -H 'Content-Type:
application/json' -d "$(cat)" > /dev/null 2>&1 &
⎿ command: ${CLAUDE_PLUGIN_ROOT}/hooks/stop-hook.sh
⎿ Stop hook error:
Do the whole migration acccording to the plan. use planning-with-files and
make sure everything is really migrated - --max-iterations=3
--completion-promise=EVERYTHING MIGRATED TO TANSTACK/QUERY
⏺ ✅ EVERYTHING MIGRATED TO TANSTACK/QUERY
⎿ Stop says: 🔄 Ralph iteration 481 | No completion promise set - loop runs
infinitely
⏺ Ran 2 stop hooks
⎿ command: curl -s -X POST http://localhost:8765/hook -H 'Content-Type:
application/json' -d "$(cat)" > /dev/null 2>&1 &
⎿ command: ${CLAUDE_PLUGIN_ROOT}/hooks/stop-hook.sh
⎿ Stop hook error:
Do the whole migration acccording to the plan. use planning-with-files and
make sure everything is really migrated - --max-iterations=3
--completion-promise=EVERYTHING MIGRATED TO TANSTACK/QUERY
⏺ ✅ EVERYTHING MIGRATED TO TANSTACK/QUERY
⎿ Stop says: 🔄 Ralph iteration 482 | No completion promise set - loop runs
infinitely
⏺ Ran 2 stop hooks
⎿ command: curl -s -X POST http://localhost:8765/hook -H 'Content-Type:
application/json' -d "$(cat)" > /dev/null 2>&1 &
⎿ command: ${CLAUDE_PLUGIN_ROOT}/hooks/stop-hook.sh
⎿ Stop hook error:
Do the whole migration acccording to the plan. use planning-with-files and
make sure everything is really migrated - --max-iterations=3
--completion-promise=EVERYTHING MIGRATED TO TANSTACK/QUERY
⏺ ✅ EVERYTHING MIGRATED TO TANSTACK/QUERY
⎿ Stop says: 🔄 Ralph iteration 483 | No completion promise set - loop runs
infinitely
⏺ Ran 2 stop hooks
⎿ command: curl -s -X POST http://localhost:8765/hook -H 'Content-Type:
application/json' -d "$(cat)" > /dev/null 2>&1 &
⎿ command: ${CLAUDE_PLUGIN_ROOT}/hooks/stop-hook.sh
⎿ Stop hook error:
Do the whole migration acccording to the plan. use planning-with-files and
make sure everything is really migrated - --max-iterations=3
--completion-promise=EVERYTHING MIGRATED TO TANSTACK/QUERY
⏺ ✅ EVERYTHING MIGRATED TO TANSTACK/QUERY
⎿ Stop says: 🔄 Ralph iteration 484 | No completion promise set - loop runs
infinitely
⏺ Ran 2 stop hooks
⎿ command: curl -s -X POST http://localhost:8765/hook -H 'Content-Type:
application/json' -d "$(cat)" > /dev/null 2>&1 &
⎿ command: ${CLAUDE_PLUGIN_ROOT}/hooks/stop-hook.sh
⎿ Stop hook error:
Do the whole migration acccording to the plan. use planning-with-files and
make sure everything is really migrated - --max-iterations=3
--completion-promise=EVERYTHING MIGRATED TO TANSTACK/QUERY
⏺ ✅ EVERYTHING MIGRATED TO TANSTACK/QUERY
⎿ Stop says: 🔄 Ralph iteration 485 | No completion promise set - loop runs
infinitely
⏺ Ran 2 stop hooks
⎿ command: curl -s -X POST http://localhost:8765/hook -H 'Content-Type:
application/json' -d "$(cat)" > /dev/null 2>&1 &
⎿ command: ${CLAUDE_PLUGIN_ROOT}/hooks/stop-hook.sh
⎿ Stop hook error:
Do the whole migration acccording to the plan. use planning-with-files and
make sure everything is really migrated - --max-iterations=3
--completion-promise=EVERYTHING MIGRATED TO TANSTACK/QUERY
⏺ ✅ EVERYTHING MIGRATED TO TANSTACK/QUERY
⎿ Stop says: 🔄 Ralph iteration 486 | No completion promise set - loop runs
infinitely
⏺ Ran 2 stop hooks
⎿ command: curl -s -X POST http://localhost:8765/hook -H 'Content-Type:
application/json' -d "$(cat)" > /dev/null 2>&1 &
⎿ command: ${CLAUDE_PLUGIN_ROOT}/hooks/stop-hook.sh
⎿ Stop hook error:
Do the whole migration acccording to the plan. use planning-with-files and
make sure everything is really migrated - --max-iterations=3
--completion-promise=EVERYTHING MIGRATED TO TANSTACK/QUERY
⏺ ✅ EVERYTHING MIGRATED TO TANSTACK/QUERY
⎿ Stop says: 🔄 Ralph iteration 487 | No completion promise set - loop runs
infinitely
⏺ Ran 2 stop hooks
⎿ command: curl -s -X POST http://localhost:8765/hook -H 'Content-Type:
application/json' -d "$(cat)" > /dev/null 2>&1 &
⎿ command: ${CLAUDE_PLUGIN_ROOT}/hooks/stop-hook.sh
⎿ Stop hook error:
Do the whole migration acccording to the plan. use planning-with-files and
make sure everything is really migrated - --max-iterations=3
--completion-promise=EVERYTHING MIGRATED TO TANSTACK/QUERY
⏺ ✅ EVERYTHING MIGRATED TO TANSTACK/QUERY
⎿ Stop says: 🔄 Ralph iteration 488 | No completion promise set - loop runs
infinitely
⏺ Ran 2 stop hooks
⎿ command: curl -s -X POST http://localhost:8765/hook -H 'Content-Type:
application/json' -d "$(cat)" > /dev/null 2>&1 &
⎿ command: ${CLAUDE_PLUGIN_ROOT}/hooks/stop-hook.sh
⎿ Stop hook error:
Do the whole migration acccording to the plan. use planning-with-files and
make sure everything is really migrated - --max-iterations=3
--completion-promise=EVERYTHING MIGRATED TO TANSTACK/QUERY
⏺ ✅ EVERYTHING MIGRATED TO TANSTACK/QUERY
⎿ Stop says: 🔄 Ralph iteration 489 | No completion promise set - loop runs
infinitely
⏺ Ran 2 stop hooks
⎿ command: curl -s -X POST http://localhost:8765/hook -H 'Content-Type:
application/json' -d "$(cat)" > /dev/null 2>&1 &
⎿ command: ${CLAUDE_PLUGIN_ROOT}/hooks/stop-hook.sh
⎿ Stop hook error:
Do the whole migration acccording to the plan. use planning-with-files and
make sure everything is really migrated - --max-iterations=3
--completion-promise=EVERYTHING MIGRATED TO TANSTACK/QUERY
⏺ ✅ EVERYTHING MIGRATED TO TANSTACK/QUERY
⎿ Stop says: 🔄 Ralph iteration 490 | No completion promise set - loop runs
infinitely
⏺ Ran 2 stop hooks
⎿ command: curl -s -X POST http://localhost:8765/hook -H 'Content-Type:
application/json' -d "$(cat)" > /dev/null 2>&1 &
⎿ command: ${CLAUDE_PLUGIN_ROOT}/hooks/stop-hook.sh
⎿ Stop hook error:
Do the whole migration acccording to the plan. use planning-with-files and
make sure everything is really migrated - --max-iterations=3
--completion-promise=EVERYTHING MIGRATED TO TANSTACK/QUERY
⏺ ✅ EVERYTHING MIGRATED TO TANSTACK/QUERY
⎿ Stop says: 🔄 Ralph iteration 491 | No completion promise set - loop runs
infinitely
⏺ Ran 2 stop hooks
⎿ command: curl -s -X POST http://localhost:8765/hook -H 'Content-Type:
application/json' -d "$(cat)" > /dev/null 2>&1 &
⎿ command: ${CLAUDE_PLUGIN_ROOT}/hooks/stop-hook.sh
⎿ Stop hook error:
Do the whole migration acccording to the plan. use planning-with-files and
make sure everything is really migrated - --max-iterations=3
--completion-promise=EVERYTHING MIGRATED TO TANSTACK/QUERY
⏺ ✅ EVERYTHING MIGRATED TO TANSTACK/QUERY
⎿ Stop says: 🔄 Ralph iteration 492 | No completion promise set - loop runs
infinitely
⏺ Ran 2 stop hooks
⎿ command: curl -s -X POST http://localhost:8765/hook -H 'Content-Type:
application/json' -d "$(cat)" > /dev/null 2>&1 &
⎿ command: ${CLAUDE_PLUGIN_ROOT}/hooks/stop-hook.sh
⎿ Stop hook error:
Do the whole migration acccording to the plan. use planning-with-files and
make sure everything is really migrated - --max-iterations=3
--completion-promise=EVERYTHING MIGRATED TO TANSTACK/QUERY
⏺ ✅ EVERYTHING MIGRATED TO TANSTACK/QUERY
⎿ Stop says: 🔄 Ralph iteration 493 | No completion promise set - loop runs
infinitely
⏺ Ran 2 stop hooks
⎿ command: curl -s -X POST http://localhost:8765/hook -H 'Content-Type:
application/json' -d "$(cat)" > /dev/null 2>&1 &
⎿ command: ${CLAUDE_PLUGIN_ROOT}/hooks/stop-hook.sh
⎿ Stop hook error:
Do the whole migration acccording to the plan. use planning-with-files and
make sure everything is really migrated - --max-iterations=3
--completion-promise=EVERYTHING MIGRATED TO TANSTACK/QUERY
⏺ ✅ EVERYTHING MIGRATED TO TANSTACK/QUERY
⎿ Stop says: 🔄 Ralph iteration 494 | No completion promise set - loop runs
infinitely
⏺ Ran 2 stop hooks
⎿ command: curl -s -X POST http://localhost:8765/hook -H 'Content-Type:
application/json' -d "$(cat)" > /dev/null 2>&1 &
⎿ command: ${CLAUDE_PLUGIN_ROOT}/hooks/stop-hook.sh
⎿ Stop hook error:
Do the whole migration acccording to the plan. use planning-with-files and
make sure everything is really migrated - --max-iterations=3
--completion-promise=EVERYTHING MIGRATED TO TANSTACK/QUERY
⎿ Interrupted · What should Claude do instead?
⏺ Stop hook failed: Maximum call stack size exceeded
⏺ Stop hook failed: Maximum call stack size exceeded
Steps to Reproduce
- Enable the ralph-wiggum plugin
- Run with equals-sign syntax:
``bash``
/ralph-loop "Test task" --max-iterations=2 --completion-promise "DONE"
- Observe: Loop runs indefinitely instead of stopping after 2 iterations
- Check state file:
``bash``
head -10 .claude/ralph-loop. local.md
- Notice
max_iterations: 0instead ofmax_iterations: 2
---
active: true
iteration: 494
max_iterations: 0
completion_promise: null
started_at: "2026-01-16T02:44:10Z"
---
Do the whole migration acccording to the plan. use planning-with-files and make sure everything is really migrated - --max-iterations=3 --completion-promise=EVERYTHING MIGRATED TO TANSTACK/QUERY
Workaround: Use space-separated syntax instead:
/ralph-loop "Test task" --max-iterations 2 --completion-promise "DONE" # ✅ Works
Claude Model
Opus
Is this a regression?
I don't know
Last Working Version
_No response_
Claude Code Version
2.1.7 (Claude Code)
Platform
Anthropic API
Operating System
macOS
Terminal/Shell
Warp
Additional Information
_No response_
This issue has 7 comments on GitHub. Read the full discussion on GitHub ↗