Build a Ralph Wiggum long-running loop extension for pi
Takeaway: Next time I'd start with the simplest possible stop mechanism - just telling the agent in its own prompt to emit the completion marker on a keyword - instead of trying to intercept aborts, keyboard shortcuts, and pending-message queues in the extension runtime.