When to use it
- Large features that span multiple files or subsystems
- Ambiguous tasks where “done” needs to be defined upfront
- Work where you want automated quality gates, not just a single pass
How it works
Select Ralph loop and set a budget
In the Twill web app, select Ralph loop from the mode dropdown in the message composer. Enter a maximum USD budget for the task. The budget is required.
Criteria drafting
A criteria agent explores your repo and drafts acceptance criteria for the
task. If the task is ambiguous, the agent asks clarifying questions with
structured options before finalizing.
Approve criteria
Review the proposed acceptance criteria. Click Approve to proceed to
implementation. You can also answer follow-up questions or ask the agent to
revise.
Implementation and verification loop
After approval, the agent implements against the criteria. When each implementation pass finishes, a separate verifier model checks whether the criteria are met:
- Pass: the task is complete.
- Fail: the verifier’s feedback is fed back into a new implementation pass automatically.
Budget enforcement
Twill tracks spend continuously during Ralph loop tasks. When spend reaches 90% of your budget, the agent wraps up its current work and stops looping. Each job in the loop shows an estimated cost badge so you can see where the budget is going.Triggering Ralph loop
- Web app
- API
Select Ralph loop in the mode dropdown and enter a budget before submitting your task.
Ralph loop always uses Claude Code Sonnet for implementation, regardless of
your workspace’s default agent or model setting.