Debugging Ralph
Ralph runs autonomously, but you need to monitor progress and debug issues when they occur.Quick Status Check
See which stories are complete and which are pending:passes: true means the story is complete. Ralph picks the highest priority story where passes: false.Check Recent Progress
See what Ralph learned in recent iterations:Check Git History
See what Ralph committed:Common Issues
Ralph keeps failing the same story
Ralph keeps failing the same story
Symptoms: Same story has
passes: false after multiple iterationsDebugging steps:Check if story is too large
The story might be too big for one context window. Check if Ralph is getting close but running out of context.Solution: Split the story into smaller pieces in
prd.json.Check acceptance criteria
Are the criteria verifiable? Vague criteria cause confusion.❌ Bad: “Make it work correctly”✅ Good: “Status dropdown shows three options: Pending, In Progress, Done”
Ralph is not finding the prd.json file
Ralph is not finding the prd.json file
Symptoms: Error about missing
prd.jsonSolution:The
prd.json file must be in the same directory as ralph.sh and prompt.md/CLAUDE.md.Quality checks are passing but Ralph says they failed
Quality checks are passing but Ralph says they failed
Symptoms: You can run
npm run typecheck successfully, but Ralph reports failuresDebugging:Check command output
Some commands output warnings that Ralph might interpret as failures.Add
--quiet flags or redirect stderr if needed:Ralph committed broken code
Ralph committed broken code
Symptoms: CI is failing, or you manually found bugsThis is serious. Broken code compounds across iterations.Solution:
Ralph is not updating AGENTS.md files
Ralph is not updating AGENTS.md files
Symptoms:
progress.txt shows learnings but AGENTS.md files are not being updatedDebugging:Check your prompt template
Ensure
prompt.md (for Amp) or CLAUDE.md (for Claude Code) includes instructions to update these files.See Customizing Prompts for details.Browser verification is failing
Browser verification is failing
Symptoms: Stories with “Verify in browser” are not completingSolution: See Browser Verification for detailed debugging steps.Quick checks:
Reading Ralph’s Output
When Ralph runs, you’ll see output from both the bash loop and the AI tool:Using jq for Advanced Queries
Count completed vs remaining stories
Count completed vs remaining stories
Show only incomplete stories
Show only incomplete stories
Show stories with notes
Show stories with notes
Get next story Ralph will work on
Get next story Ralph will work on
Monitoring Long-Running Ralph
If Ralph is running for many iterations:When to Intervene
Same story fails 3+ times
Stop Ralph and investigate. The story is likely too big or has unclear criteria.
Ralph completes a story incorrectly
Stop, revert the commit, update acceptance criteria to be more specific, and resume.
Debugging Checklist
When things go wrong:- Check which story Ralph is working on:
jq '.userStories[] | {id, passes}' prd.json - Read recent progress:
tail -50 progress.txt - Check git history:
git log --oneline -5 - Verify quality checks work manually:
npm run typecheck && npm test - Check if story is too large (see Right-Sizing Stories)
- Check if acceptance criteria are specific enough
- Look for repeated errors in
progress.txt - Verify dev server is running (for UI stories)
Next Steps
- Right-Sizing Stories - Prevent story size issues
- Customizing Prompts - Add better error handling
- Archiving - Learn how Ralph manages previous runs

