# How to Debug Ralph When Iterations Stall or Stories Are Incomplete

> Debug Ralph when iterations stall or stories are incomplete. Check output, sentinel logs, progress.txt, and prd.json status to resolve issues quickly.

- Repository: [Ryan Carson/ralph](https://github.com/snarktank/ralph)
- Tags: how-to-guide
- Published: 2026-04-13

---

**When Ralph stalls or leaves user stories incomplete, inspect the captured `OUTPUT` for tool crashes, verify the `<promise>COMPLETE</promise>` sentinel appears in logs, confirm [`progress.txt`](https://github.com/snarktank/ralph/blob/main/progress.txt) records new iterations, and ensure [`prd.json`](https://github.com/snarktank/ralph/blob/main/prd.json) updates story status to `passes: true`.**

Ralph is a self-contained autonomous AI agent loop developed by **snarktank** that repeatedly invokes Amp or Claude Code until every user story in your PRD is marked complete. The orchestration logic lives entirely in [`ralph.sh`](https://github.com/snarktank/ralph/blob/main/ralph.sh), which manages branch archiving, progress logging