Third, splitting the time. Sessions run out, and memory does not carry over, so the work has to survive in files.
Ralph loop
Also called Ralph Wiggum loop, Ralph
The same prompt, fed to a fresh agent, over and over, in a shell loop. Each run does one thing, writes down what it did, and exits. Its memory is on disk. It is cheap to set up, and it has no way of stopping unless you build one.
A fresh session each time means no drift and no bloat, and a loop means it carries on while you are away. It only works with a plan on disk, a check that can say no, and a limit, or it will happily spend your money making things worse.
Say it to your agent
“Write me a script that runs claude -p in a loop on PROMPT.md: one item from fix_plan.md per run, then commit. Stop when ./check.sh passes or after 20 runs. Pass --max-turns and --max-budget-usd each time.”