Home β€Ί Ralph Loops

πŸ”„ Ralph Wiggum Autonomous Loops

Unattended overnight coding. OpenCode called repeatedly with previous output + git diff context.

Model matters7b models cannot use OpenCode tools β€” they output tool-call JSON as text. Use qwen3-coder:480b-cloud for any scaffolding or tool-use work.

Start a Loop

mkdir -p ~/ralph/my-project
cat > ~/ralph/my-project/GOAL.md << 'EOF'
## Goal
Describe the final outcome.
## Success Condition
DONE when: [testable, binary condition]
## Status
IN PROGRESS
EOF

cat > ~/ralph/my-project/RALPH_CONFIG << 'EOF'
RALPH_MODEL=qwen3-coder:480b-cloud
RALPH_PROVIDER=ollama
RALPH_MAX_ITERATIONS=500
RALPH_STEP_TIMEOUT=600
EOF

tmux new -d -s my-project '~/bin/ralph-start my-project'

Monitor

~/bin/ralph-status my-project
tail -f ~/ralph/my-project/ralph.log
tmux attach -t my-project         # Ctrl+B then D to detach

Send a Hint Mid-Loop

echo "Use async/await. Do not use callbacks." \
  > ~/ralph/my-project/spun-hint.txt

Stop

~/bin/ralph-stop my-project       # graceful
~/bin/ralph-kill my-project       # emergency SIGKILL
pkill -f ralph-start && sleep 2 && pkill -f "opencode run"   # kill ALL