stateful_ralph
One session, held for the whole run, re-sent the task every round. The opposite trade to ralph_loop: the agent remembers every round it has taken, including the approaches it has already ruled out.
hmz exec -f stateful_ralph -a kimi/kimi-code/k3:high "$(cat TASK.md)"What grows here is not only the spend: one session is one conversation, and the context window is the other thing a long run of this runs into.
What grows
Two things, and only one of them is money. The spend is the allowance's business. The other is the context window: one session is one conversation, and a conversation that has been going for six hours is one the backend is compacting, summarising or refusing. That ceiling is the backend's rather than humanize's.
Reach for this when the work is exploratory — when what has already been tried is the expensive thing to rediscover — and for ralph_loop when the work is long.
What ends it
The run's allowance — hours, millions of output tokens, dollars — held to at the edges of every turn of every session rather than implemented here; the flow itself takes no settings at all. It declares ten million output tokens as what a run of it is worth by default, and -c budget.yaml with a budget: mapping in it, or the budget row in /flow, says otherwise.
What it keeps
rounds — and not the session, which is the one thing this flow is and the one thing a run picked up cannot have back. No backend reopens a named session, so running this again is a conversation of its own, starting from the task and the repository with none of the rounds before it in context. A loop stopped on its fortieth round says round 41 when it is started again, and remembers nothing else about the forty.
What else ends it
Three rounds in a row that answered with nothing, exactly as in ralph_loop: a stall under a token allowance that never moves, stopped rather than declared over, with what it kept left alone for the run that fixes it.
See also
- ralph_loop — a session of its own each round
- continue_loop — one session too, nudged rather than re-sent the task
- Picking a run up — what a resumable flow may and may not carry