The nightly Ralph loop · Peter Vanhee · Cloudwired, October 22, 2026
A nightly coding loop opened 82 PRs in 13 days and merged none of them
Vanhee runs headless Claude Code against GitHub issues labelled ready, one issue per PR, on an always-on laptop. By his count the loop has opened 82 PRs across six repositories in 13 days; he merged 74, seven are open, and the loop merged none because gh pr merge, git push origin main, npm publish and similar commands are on a deny list at the permission level. A 23-line script reads his subscription usage and ends the night when a threshold trips; if it cannot read the numbers it reports 100% and stops. He reports 70 of the 74 merged PRs landed within a day of opening, with a median change of 277 lines. His stated failure modes: batches of its own PRs colliding on shared files, and a review pass that counted the loop's own comments as his feedback, so 12 of 17 revision passes pushed nothing.
The post carries first-party numbers but no linked repository, so the figures are his and cannot be reproduced from the page. Vanhee credits Geoffrey Huntley for the Ralph loop.
Why it matters: The safety design here is the part to copy: the human controls the queue, merging is denied by permissions rather than asked for in a prompt, and the agent is told that "A clear question is a good night's work." It also shows that an unattended loop needs its own review cycle, since most of his rules came from reading the loop's logs.