Skip to content

v1.1.0

Choose a tag to compare

@edxeth edxeth released this 08 Jun 13:25

Install:

pi install git:github.com/edxeth/pi-ralph-loop@v1.1.0

Or latest:

pi install git:github.com/edxeth/pi-ralph-loop

πŸ› Bug Fixes

An interrupted NEXT handoff is now resumable instead of fatal

Refs: 47b5e10

When the agent emits NEXT, the iteration advances and the loop briefly transitions while it starts a fresh session. Previously, if Pi quit, reloaded, or crashed during that window, the loop was finalized with stop reason error β€” making a valid, already-advanced iteration look dead and discouraging resume.

A new interrupted stop reason now covers a committed handoff that gets cut off (quit/reload mid-transition, or a crash detected at next startup that was mid-transition). /ralph-resume continues the saved iteration as normal. A mid-iteration crash with no committed handoff still finalizes as error. This does not add unattended auto-resume after the host process exits β€” that still requires /ralph-resume from a long-lived session.

Verification gates no longer re-run at promise emission (advisory only)

Refs: b6b6cd9

verification_gates were re-executed by the harness on every NEXT/COMPLETE. For a real gate like a full test suite, this ran synchronously and froze Pi's event loop for the gate's entire duration after the agent had already gone idle, and duplicated the test run the agent already did in-iteration with its output hidden from chat.

Gates are now advisory: they stay in items.json and are surfaced to the runtime agent (which is instructed to run every required gate before emitting a promise), but the harness no longer executes them at promise emission. The cheap, useful checks are unchanged and still enforced: item-state, progress-append, source-doc, and commit checks. If you relied on the harness blocking promises on gate failure, that enforcement now lives with the agent.

Long multi-turn recovery no longer killed mid-work by the provider-error timer

Refs: 089ad6e

A provider-error reply arms a 180s wait to give Pi's auto-retry time to land before declaring the loop dead. That wait was only superseded by the next agent_end β€” but during a long multi-turn recovery, no agent_end arrives until the whole unit finishes. The timer could fire mid-work and finalize the loop as error while the agent was healthy and productive, with a clean NEXT later landing in an already-dead loop.

The wait is now superseded on every turn_end. A landed turn is itself proof Pi recovered, so an active recovery keeps the loop alive no matter how long it runs.

Promise nudges reset after a provider error

Refs: 5d97f15

A broken provider connection could poison the current promise-nudge budget: missing-promise nudges accumulated before the error counted against the recovered replies, sometimes failing the loop immediately after recovery. Ralph now resets the missing-promise nudge chain whenever it enters provider-error wait handling, so recovered replies get a fresh chain. Provider failures still increment error_count and use the existing retry window, and the five-total-reply boundary for consecutive no-promise replies is unchanged.